Skip to content

Commit

Permalink
Update cast.py
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl authored Oct 1, 2023
1 parent f18fa44 commit f0836eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def convert_dtypes(
base_dtype = np.dtype(str)
else:
base_dtype = inferred_dtype
if base_dtype.kind == "O" and isna(input_array).all():
if base_dtype.kind == "O" and len(input_array) > 0 and isna(input_array).all():
import pyarrow as pa

pa_type = pa.null()
Expand Down

0 comments on commit f0836eb

Please sign in to comment.