Dataframe Colors
Changing the color and style of the dataframe within Mito.
Setting dataframe colors allows you to change the colors of the displayed dataframes headers and rows. Dataframe formatting is the easiest way to make your dataframes presentable to colleages, for example if you are copying them into an email or slide deck.
- 1.Click Format and then Set dataframe colors.
- 2.In the Color Dataframe taskpane that opens, select a Suggested Style to change the color of your dataframe.
- 3.You can also manually configure the Column Headers, Rows, or Dataframe Border by expanding these sections.

A suggested style being applied to a dataframe to make it ready for presentation.
When you style your dataframe, Mito will generate code that styles this dataframe in your notebook. This code will look something like this:
# Formatted dataframes. Print these styling objects to see the formatted dataframe
forestfires_styler = forestfires.style\
.set_table_styles([
{'selector': 'thead', 'props': [('color', '#FFFFFF'), ('background-color', '#8F1B15')]},
{'selector': 'tbody tr:nth-child(odd)', 'props': [('color', '#494650'), ('background-color', '#F0DADA')]},
{'selector': 'tbody tr:nth-child(even)', 'props': [('color', '#494650')]},
])
To view your formatted dataframe in your notebook, simply display the forestfires_styler object. You can then copy this formatted dataframe anywhere you please.

Last modified 5mo ago