Skip to content

Commit 1c29b35

Browse files
Revert old fix and move fix to apply in Series
1 parent b394569 commit 1c29b35

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pandas/core/arrays/datetimelike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ def map(self, mapper):
713713
# Else, just rewrite _map_infer_values to do the right thing.
714714
from pandas import Index
715715

716-
return Index(self).map(mapper)
716+
return Index(self).map(mapper).array
717717

718718
# ------------------------------------------------------------------
719719
# Null Handling

pandas/core/series.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3687,7 +3687,9 @@ def f(x):
36873687

36883688
if len(mapped) and isinstance(mapped[0], Series):
36893689
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)
36913693
else:
36923694
return self._constructor(mapped,
36933695
index=self.index).__finalize__(self)

0 commit comments

Comments
 (0)