Skip to content

Commit c3d5d74

Browse files
Add comment and whatsnew entry
1 parent 1c29b35 commit c3d5d74

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

doc/source/whatsnew/v0.25.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ Timezones
283283
- Bug in :func:`Timestamp.tz_localize` and :func:`Timestamp.tz_convert` does not propagate ``freq`` (:issue:`25241`)
284284
- Bug in :func:`Series.at` where setting :class:`Timestamp` with timezone raises ``TypeError`` (:issue:`25506`)
285285
- Bug in :func:`DataFrame.update` when updating with timezone aware data would return timezone naive data (:issue:`25807`)
286+
- Bug in :func:`Series.apply` failed when the series is a timezone aware datetime index (:issue:`25959`)
286287

287288
Numeric
288289
^^^^^^^

pandas/core/series.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3687,6 +3687,8 @@ def f(x):
36873687

36883688
if len(mapped) and isinstance(mapped[0], Series):
36893689
from pandas.core.frame import DataFrame
3690+
# GH 25959 we don't need to call tolist
3691+
# if we've been given an ExtensionArray
36903692
if not isinstance(mapped, ExtensionArray):
36913693
mapped = mapped.tolist()
36923694
return DataFrame(mapped, index=self.index)

0 commit comments

Comments
 (0)