Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update cast.py
  • Loading branch information
phofl authored Oct 1, 2023
commit 1c37e08d1c13161fb523eb8006b60123e58c99ee
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