Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
>>> pd.Categorical([1, "2", 3, 4])
[1, 2, 3, 4]
Categories (4, object): [1, 3, 4, 2]
Problem description
does not show the string elements quoted. This is inconsistent with numpy.
>>> np.array([1, "2", 3, 4], dtype="object")
array([1, '2', 3, 4], dtype=object)
Expected Output
>>> pd.Categorical([1, "2", 3, 4])
[1, '2', 3, 4]
Categories (4, object): [1, 3, 4, '2']
Output of pd.show_versions()
[paste the output of pd.show_versions()
here leaving a blank line after the details tag]