We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e689153 commit 42395cbCopy full SHA for 42395cb
pandas/core/indexes/accessors.py
@@ -322,9 +322,10 @@ def __new__(cls, data):
322
orig = data if is_categorical_dtype(data) else None
323
if orig is not None:
324
data = Series(
325
- orig.values.astype(orig.values.categories.dtype),
+ orig.values.__array__(),
326
name=orig.name,
327
copy=False,
328
+ dtype=orig.values.categories.dtype,
329
)
330
331
if is_datetime64_dtype(data.dtype):
0 commit comments