dtale icon indicating copy to clipboard operation
dtale copied to clipboard

allow user to access "Highlight" and "Settings" features from the .show() method

Open Gdsimms opened this issue 11 months ago • 2 comments

The first thing I do with every dtale window I create is go to the "Settings" menu and turn on "Vertical Column Headers." This does not seem to be accessible from the .show() command itself. It would be nice to have some more programmatic flexibility in calling the .show() method to turn on commonly used or situationally desired features.

Gdsimms avatar May 14 '25 17:05 Gdsimms

So I am able to turn on "Vertical Column Headers" by doing the following:

import dtale
import pandas as pd

dtale.show(pd.DataFrame([dict(x=1, y=2, z=3)]), vertical_headers=True)

And you should be able to choose from the different highlight modes by doing the following:

import dtale
import pandas as pd

dtale.show(pd.DataFrame([dict(x=1, y=2, z=3)]), background_mode="dtypes")

The different background mode options are:

  • heatmap-all: turn on heatmap for all numeric columns where the colors are determined by the range of values over all numeric columns combined
  • heatmap-col: turn on heatmap for all numeric columns where the colors are determined by the range of values in the column
  • heatmap-col-[column name]: turn on heatmap highlighting for a specific column
  • dtypes: highlight columns based on it's data type
  • missing: highlight any missing values (np.nan, empty strings, strings of all spaces)
  • outliers: highlight any outliers
  • range: highlight values for any matchers entered in the "range_highlights" option
  • lowVariance: highlight values with a low variance

aschonfeld avatar Jul 29 '25 16:07 aschonfeld

Sorry for taking so long to respond... Thank you for showing me this. I couldn't find anything like this when I searched the documentation. What's the best way to get a comprehensive list of .show() keyword arguments? Reading the source code?

Gdsimms avatar Nov 19 '25 17:11 Gdsimms