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
min version fix
  • Loading branch information
Rohan Jain committed Dec 28, 2023
commit e6c7930c5a7e2561c60a83a7c50c3b57b51a568e
5 changes: 4 additions & 1 deletion pandas/core/arrays/arrow/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def cast_for_truediv(
):
# https://github.com/apache/arrow/issues/35563
# Arrow does not allow safe casting large integral values to float64.
return arrow_array.cast(pa.float64(), safe=False)
# Intentionally not using arrow_array.cast because it could be a scalar
# value in reflected case, and safe=False only added to
# scalar cast in pyarrow 13.
return pc.cast(arrow_array, pa.float64(), safe=False)
return arrow_array

def floordiv_compat(
Expand Down