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 a741e4b commit 38f375aCopy full SHA for 38f375a
pandas/core/arrays/arrow/array.py
@@ -1490,16 +1490,9 @@ def to_numpy(
1490
return result
1491
1492
def map(self, mapper, na_action: Literal["ignore"] | None = None):
1493
- if not is_string_dtype(self.dtype) and any(
1494
- [
1495
- is_numeric_dtype(self.dtype)
1496
- or pa.types.is_date(self.dtype.pyarrow_dtype)
1497
- or pa.types.is_timestamp(self.dtype.pyarrow_dtype)
1498
- ]
1499
- ):
+ if self.dtype.kind == "mM" or is_numeric_dtype(self.dtype):
1500
return map_array(self.to_numpy(), mapper, na_action=na_action)
1501
- else:
1502
- return super().map(mapper, na_action)
+ return super().map(mapper, na_action)
1503
1504
@doc(ExtensionArray.duplicated)
1505
def duplicated(
0 commit comments