File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -713,7 +713,7 @@ def map(self, mapper):
713
713
# Else, just rewrite _map_infer_values to do the right thing.
714
714
from pandas import Index
715
715
716
- return Index (self ).map (mapper )
716
+ return Index (self ).map (mapper ). array
717
717
718
718
# ------------------------------------------------------------------
719
719
# Null Handling
Original file line number Diff line number Diff line change @@ -3687,7 +3687,9 @@ def f(x):
3687
3687
3688
3688
if len (mapped ) and isinstance (mapped [0 ], Series ):
3689
3689
from pandas .core .frame import DataFrame
3690
- return DataFrame (mapped .tolist (), index = self .index )
3690
+ if not isinstance (mapped , ExtensionArray ):
3691
+ mapped = mapped .tolist ()
3692
+ return DataFrame (mapped , index = self .index )
3691
3693
else :
3692
3694
return self ._constructor (mapped ,
3693
3695
index = self .index ).__finalize__ (self )
You can’t perform that action at this time.
0 commit comments