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 7c00c66 commit 90d6251Copy full SHA for 90d6251
pandas/core/dtypes/cast.py
@@ -1127,6 +1127,7 @@ def convert_dtypes(
1127
or (
1128
inferred_dtype.kind not in "iufcb"
1129
and not isinstance(inferred_dtype, StringDtype)
1130
+ and not isinstance(inferred_dtype, CategoricalDtype)
1131
)
1132
):
1133
if isinstance(inferred_dtype, PandasExtensionDtype) and not isinstance(
@@ -1143,7 +1144,6 @@ def convert_dtypes(
1143
1144
base_dtype.kind == "O" # type: ignore[union-attr]
1145
and input_array.size > 0
1146
and isna(input_array).all()
- and not isinstance(input_array.dtype, CategoricalDtype)
1147
1148
import pyarrow as pa
1149
0 commit comments