pandas has predefined formatting rules written and stored as functions that can be readily used.
The highlight_null method highlights all NaNs or Null values in the data with a specified color. In the DataFrame under discussion, the Age and Cabin columns have NaNs. Hence, in the following screenshot, the NaNs are flagged in blue in these columns.
The following snippet highlights the NaN values in these columns:
df.style.highlight_null(null_color = "blue")
This results in the following output:
The highlight_max and highlight_min methods apply highlighting (with a chosen ...