# Dataframe Colors

{% hint style="info" %} <img src="https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2F33pbsEsNWz43XeXK61bR%2Fspaces--MP_U5ZCmiamDOXEOOTC-uploads-git-blob-f8b7f9b98651f829f5edc50dd64de70268a8d9b0-Pro%20Logo(1).png?alt=media&#x26;token=b117f44a-b417-400c-af59-f9f03cc3c550" alt="" data-size="line"> This is a [Mito Pro](https://www.trymito.io/plans) feature. [Upgrade](https://www.trymito.io/plans) to make your dataframes presentation ready. <img src="https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2F33pbsEsNWz43XeXK61bR%2Fspaces--MP_U5ZCmiamDOXEOOTC-uploads-git-blob-f8b7f9b98651f829f5edc50dd64de70268a8d9b0-Pro%20Logo(1).png?alt=media&#x26;token=b117f44a-b417-400c-af59-f9f03cc3c550" alt="" data-size="line">&#x20;
{% endhint %}

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.

### Setting a Dataframe Format

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.

<figure><img src="https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2F5KtMNavA7sL4t1tqEkgn%2FScreenshot%202023-11-28%20at%204.30.39%20PM.png?alt=media&#x26;token=21db53eb-1213-4e63-ba90-8452220bf390" alt=""><figcaption></figcaption></figure>

### The Generated Styling Code

When you style your dataframe, Mito will generate code that styles this dataframe in your notebook. This code will look something like this:

```python
# 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.&#x20;

<figure><img src="https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2FYkOSfxdbDxU1Fu7kPMzL%2FScreen%20Shot%202022-09-28%20at%2010.38.10%20AM.png?alt=media&#x26;token=39699722-6737-4eaf-895c-c8b45201152f" alt=""><figcaption></figcaption></figure>
