Skip to content

Commit 9f40dc7

Browse files
committed
replace is_categorical -> is_categorical_dtype
1 parent f40d6ca commit 9f40dc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/generic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
ensure_str,
6767
is_bool,
6868
is_bool_dtype,
69-
is_categorical,
69+
is_categorical_dtype,
7070
is_datetime64_any_dtype,
7171
is_datetime64tz_dtype,
7272
is_dict_like,
@@ -5795,7 +5795,7 @@ def astype(
57955795
for i in range(len(self.columns))
57965796
]
57975797

5798-
elif is_categorical(self):
5798+
elif is_categorical_dtype(self):
57995799
new_data = pd.Categorical.from_codes(
58005800
self.cat.codes, categories=self.cat.categories.astype(dtype)
58015801
)

0 commit comments

Comments
 (0)