We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d82b02 commit c18ae4eCopy full SHA for c18ae4e
pandas/core/generic.py
@@ -66,7 +66,7 @@
66
ensure_str,
67
is_bool,
68
is_bool_dtype,
69
- is_categorical,
+ is_categorical_dtype,
70
is_datetime64_any_dtype,
71
is_datetime64tz_dtype,
72
is_dict_like,
@@ -5795,7 +5795,7 @@ def astype(
5795
for i in range(len(self.columns))
5796
]
5797
5798
- elif is_categorical(self):
+ elif is_categorical_dtype(self):
5799
new_data = pd.Categorical.from_codes(
5800
self.cat.codes, categories=self.cat.categories.astype(dtype)
5801
)
0 commit comments