BUG: disallow scalar in CategoricalIndex construtor by jbrockmendel · Pull Request #38614 · pandas-dev/pandas (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not actually about passing scalar data, but about passing no data (eg pd.CategoricalIndex(categories=['a', 'b'])
). We generally support constructors with passing no data to create an empty (eg Series also allows this).
So I would either keep supporting this, or either it should at least be deprecated (this eg breaks dask)