File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1483,14 +1483,8 @@ def to_numpy(
14831483 def map (self , mapper , na_action : Literal ["ignore" ] | None = None ):
14841484 if is_numeric_dtype (self .dtype ):
14851485 return map_array (self .to_numpy (), mapper , na_action = na_action )
1486- if self .dtype .name .startswith ("timestamp" ):
1487- try :
1488- # Convert elements to pandas.Timestamp (or datetime64[ns])
1489- self = self .astype ("datetime64[ns]" )
1490- except Exception :
1491- # fallback: safe, slow path
1492- self = np .array ([Timestamp (x .as_py ()) for x in self ])
1493- return map_array (self , 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 )
14941488 else :
14951489 return super ().map (mapper , na_action )
14961490
You can’t perform that action at this time.
0 commit comments