BUG: tz_localize(None) with Arrow timestamp (original) (raw)

Pandas version checks

Reproducible Example

based on test_dt_tz_localize_none

import pandas as pd import pyarrow as pa

ts = pd.Timestamp("2023-01-02 3:00:00")

ser = pd.Series( [ts, None], dtype=pd.ArrowDtype(pa.timestamp("ns", tz="US/Pacific")), ) res = ser.dt.tz_localize(None)

assert res[0] == ser[0].tz_localize(None) # <- nope!

Issue Description

The pyarrow tz_localize AFAICT is equivalent to .tz_convert("UTC").tz_localize(None)

Expected Behavior

Equivalent to pointwise operation, matching the non-pyarrow tz_localize

Installed Versions

Replace this line with the output of pd.show_versions()