Skip to content

Commit 02218af

Browse files
veljaninyuanx749
authored andcommitted
removing the change for input_array...
1 parent e7c4911 commit 02218af

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,10 +1151,7 @@ def convert_dtypes(
11511151
else:
11521152
pa_type = to_pyarrow_type(base_dtype)
11531153
if pa_type is not None:
1154-
if isna(input_array).all() and hasattr(input_array, "categories"):
1155-
inferred_dtype = input_array.dtype
1156-
else:
1157-
inferred_dtype = ArrowDtype(pa_type)
1154+
inferred_dtype = ArrowDtype(pa_type)
11581155

11591156
elif dtype_backend == "numpy_nullable" and isinstance(inferred_dtype, ArrowDtype):
11601157
# GH 53648

0 commit comments

Comments
 (0)