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 78b92c4 commit ffb2a6fCopy full SHA for ffb2a6f
pandas/core/arrays/arrow/array.py
@@ -1478,10 +1478,10 @@ def to_numpy(
1478
return result
1479
1480
def map(self, mapper, na_action: Literal["ignore"] | None = None):
1481
- if is_numeric_dtype(self.dtype):
1482
- return map_array(self.to_numpy(), mapper, na_action=na_action)
1483
- elif pa.types.is_date(self.dtype.pyarrow_dtype) or pa.types.is_timestamp(
1484
- self.dtype.pyarrow_dtype
+ if (
+ is_numeric_dtype(self.dtype)
+ or pa.types.is_date(self.dtype.pyarrow_dtype)
+ or pa.types.is_timestamp(self.dtype.pyarrow_dtype)
1485
):
1486
return map_array(self.to_numpy(), mapper, na_action=na_action)
1487
else:
0 commit comments