File tree 3 files changed +5
-2
lines changed
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Bug fixes
35
35
~~~~~~~~~
36
36
- Fixed bug for :class: `ArrowDtype ` raising ``NotImplementedError `` for fixed-size list (:issue: `55000 `)
37
37
- 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 `)
38
39
- Fixed bug in :meth: `Series.pct_change ` and :meth: `DataFrame.pct_change ` showing unnecessary ``FutureWarning `` (:issue: `54981 `)
39
40
40
41
.. ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change 18
18
from pandas ._libs .tslibs import (
19
19
Timedelta ,
20
20
Timestamp ,
21
+ timezones ,
21
22
)
22
23
from pandas .compat import (
23
24
pa_version_under7p0 ,
@@ -2421,7 +2422,7 @@ def _dt_time(self):
2421
2422
2422
2423
@property
2423
2424
def _dt_tz (self ):
2424
- return self .dtype .pyarrow_dtype .tz
2425
+ return timezones . maybe_get_tz ( self .dtype .pyarrow_dtype .tz )
2425
2426
2426
2427
@property
2427
2428
def _dt_unit (self ):
Original file line number Diff line number Diff line change 31
31
import pytest
32
32
33
33
from pandas ._libs import lib
34
+ from pandas ._libs .tslibs import timezones
34
35
from pandas .compat import (
35
36
PY311 ,
36
37
is_ci_environment ,
@@ -2477,7 +2478,7 @@ def test_dt_tz(tz):
2477
2478
dtype = ArrowDtype (pa .timestamp ("ns" , tz = tz )),
2478
2479
)
2479
2480
result = ser .dt .tz
2480
- assert result == tz
2481
+ assert result == timezones . maybe_get_tz ( tz )
2481
2482
2482
2483
2483
2484
def test_dt_isocalendar ():
You can’t perform that action at this time.
0 commit comments