Use repr of fill_value in SparseDtype repr by topper-123 · Pull Request #34352 · pandas-dev/pandas (original) (raw)

The CategoricalDtype is fine:

In [9]: pd.Categorical([1, 2, '3']).dtype 
Out[9]: CategoricalDtype(categories=[1, 2, '3'], ordered=False)

Categorical itself is not:

In [11]: pd.Categorical([1, 2, '3']) 
Out[11]: 
[1, 2, 3]
Categories (3, object): [1, 2, 3]

but that is actually already being handled in #34222