File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1481,10 +1481,10 @@ def to_numpy(
1481
1481
return result
1482
1482
1483
1483
def map (self , mapper , na_action : Literal ["ignore" ] | None = None ):
1484
- if is_numeric_dtype (self .dtype ):
1484
+ if is_numeric_dtype (self .dtype ) or self . dtype == "timestamp[ns][pyarrow]" :
1485
1485
return map_array (self .to_numpy (), mapper , na_action = na_action )
1486
- elif self .dtype == "timestamp[ns][pyarrow]" :
1487
- return map_array (self .to_numpy (dtype = object ), mapper , na_action = na_action )
1486
+ # elif self.dtype == "timestamp[ns][pyarrow]":
1487
+ # return map_array(self.to_numpy(), mapper, na_action=na_action)
1488
1488
else :
1489
1489
return super ().map (mapper , na_action )
1490
1490
Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ def test_map_kwargs():
608
608
609
609
def test_map_arrow_timestamp_dict ():
610
610
# GH 61231
611
- pytest .importorskip ("pyarrow" , minversion = "10.0.1" )
611
+ pytest .importorskip ("pyarrow" )
612
612
613
613
ser = Series (date_range ("2023-01-01" , periods = 3 )).astype ("timestamp[ns][pyarrow]" )
614
614
mapper = {ts : i for i , ts in enumerate (ser )}
You can’t perform that action at this time.
0 commit comments