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 ,
@@ -2425,7 +2426,7 @@ def _dt_time(self):
2425
2426
2426
2427
@property
2427
2428
def _dt_tz (self ):
2428
- return self .dtype .pyarrow_dtype .tz
2429
+ return timezones . maybe_get_tz ( self .dtype .pyarrow_dtype .tz )
2429
2430
2430
2431
@property
2431
2432
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 ,
@@ -2432,7 +2433,7 @@ def test_dt_tz(tz):
2432
2433
dtype = ArrowDtype (pa .timestamp ("ns" , tz = tz )),
2433
2434
)
2434
2435
result = ser .dt .tz
2435
- assert result == tz
2436
+ assert result == timezones . maybe_get_tz ( tz )
2436
2437
2437
2438
2438
2439
def test_dt_isocalendar ():
You can’t perform that action at this time.
0 commit comments