hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Convert DataFrame columns with type RangeIndex to strings

Open hoxbro opened this issue 3 years ago • 0 comments

This should be seen as a small (and definitely not exhaustive) step toward working with non-strings columns and hv.Dimension.

Related to https://github.com/holoviz/holoviews/issues/5353, and with the upcoming change from DeprecationWarning to FutureWarning in https://github.com/holoviz/holoviews/pull/5472 will now give users warnings in their existing notebooks.

Most of these warnings will properly come from an initialized pd.DataFrame or pd.Series without defining the column names. This PR checks if the column is pd.RangeIndex and converts it to strings. An example is given below, with the upcoming change to FutureWarning and removing lru_cache to see all warnings for more information, see https://github.com/holoviz/holoviews/pull/5472.

Before After
before after

hoxbro avatar Oct 12 '22 11:10 hoxbro