Conditional Formatting

Explore or highlight your data by changing the format of specific cells.

Conditional formatting makes it easy to highlight certain values or make particular cells easy to identify. It changes the appearance of a cell based on a condition. You can use conditional formatting to highlight cells that contain values which meet a certain condition.

Adding Conditional Formats

  1. Open the Home tab of the toolbar.

  2. Click Conditional Formatting in the toolbar.

  3. Click Add Conditional Formatting Rule.

  4. Click on the newly added rule to configure it:

    1. Select the Columns to apply the conditional format within.

    2. Select the filter condition Where the conditional format should apply.

    3. Set the Text Color and Background Color to apply to the cells identified by this condition.

Adding Multiple Conditional Formats

Conditional formatting rules will be applied in-order, with later conditional formatting rules overwriting earlier ones. For example:

  1. First conditional format sets cells >= 7 to have a red background color.

  2. Second conditional format sets cells >= 8 to have a blue background color.

All cells equal to 7 will have a red background. All cells >= 8 will have a blue background color, as this rule is later, and so will overwrite the first conditional format.

Invalid Conditional Formatting Rules

Not all conditions can be applied to all columns. For example, if you are adding a conditional format to a number column, but you use the string starts with condition to select cells, this will error.

If the conditional formatting rule cannot be applied, it will display an error message prompting you to update the filter condition.

The Generated Styling Code

To view the dataframe with conditional formats in your notebook, simply display the styling object generated by Mito:

Last updated