Conditional Formatting
Explore or highlight your data by changing the format of specific cells.
Last updated
Explore or highlight your data by changing the format of specific cells.
Last updated
© Mito
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.
Open the Home tab of the toolbar.
Click Conditional Formatting in the toolbar.
Click Add Conditional Formatting Rule.
Click on the newly added rule to configure it:
Select the Columns to apply the conditional format within.
Select the filter condition Where the conditional format should apply.
Set the Text Color and Background Color to apply to the cells identified by this condition.
Conditional formatting rules will be applied in-order, with later conditional formatting rules overwriting earlier ones. For example:
First conditional format sets cells >= 7 to have a red background color.
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.
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.
To view the dataframe with conditional formats in your notebook, simply display the styling object generated by Mito: