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 f9fa158 commit f20b03dCopy full SHA for f20b03d
pandas/core/arrays/arrow/array.py
@@ -2920,8 +2920,8 @@ def _dt_total_seconds(self) -> Self:
2920
unit = self._pa_array.type.unit
2921
unit_to_seconds = {"s": 1.0, "ms": 1e-3, "us": 1e-6, "ns": 1e-9}
2922
factor = unit_to_seconds[unit]
2923
- int_arr = pc.cast(self._pa_array, pa.int64())
2924
- result = pc.multiply(pc.cast(int_arr, pa.float64()), factor)
+ float_arr = pc.cast(pc.cast(self._pa_array, pa.int64()), pa.float64())
+ result = pc.multiply(float_arr, factor)
2925
return self._from_pyarrow_array(result)
2926
2927
def _dt_as_unit(self, unit: str) -> Self:
0 commit comments