File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Bug fixes
3535~~~~~~~~~
3636- Fixed bug for :class: `ArrowDtype ` raising ``NotImplementedError `` for fixed-size list (:issue: `55000 `)
3737- Fixed bug in :meth: `DataFrame.stack ` with ``future_stack=True `` and columns a non-:class: `MultiIndex ` consisting of tuples (:issue: `54948 `)
38+ - Fixed bug in :meth: `Series.dt.tz ` with :class: `ArrowDtype ` where a string was returned instead of a ``tzinfo `` object (:issue: `55003 `)
3839- Fixed bug in :meth: `Series.pct_change ` and :meth: `DataFrame.pct_change ` showing unnecessary ``FutureWarning `` (:issue: `54981 `)
3940
4041.. ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1818from pandas ._libs .tslibs import (
1919 Timedelta ,
2020 Timestamp ,
21+ timezones ,
2122)
2223from pandas .compat import (
2324 pa_version_under7p0 ,
@@ -2421,7 +2422,7 @@ def _dt_time(self):
24212422
24222423 @property
24232424 def _dt_tz (self ):
2424- return self .dtype .pyarrow_dtype .tz
2425+ return timezones . maybe_get_tz ( self .dtype .pyarrow_dtype .tz )
24252426
24262427 @property
24272428 def _dt_unit (self ):
Original file line number Diff line number Diff line change 3131import pytest
3232
3333from pandas ._libs import lib
34+ from pandas ._libs .tslibs import timezones
3435from pandas .compat import (
3536 PY311 ,
3637 is_ci_environment ,
@@ -2477,7 +2478,7 @@ def test_dt_tz(tz):
24772478 dtype = ArrowDtype (pa .timestamp ("ns" , tz = tz )),
24782479 )
24792480 result = ser .dt .tz
2480- assert result == tz
2481+ assert result == timezones . maybe_get_tz ( tz )
24812482
24822483
24832484def test_dt_isocalendar ():
You can’t perform that action at this time.
0 commit comments