BUG: Reindexing two tz-aware indices drops tz on the target index when tolerance and method is specified for only "ffill" and "bfill" #38566
Labels
Bug
Regression
Functionality that used to work in a prior pandas version
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Timezones
Timezone data dtype
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample
Problem description
The following exception is raised when
method
is"ffill"
and"bfill"
but not"nearest"
(see #32740) ANDtolerance
is specifiedI found the timezone was dropped when reaching this function on lines 3024 and 3036
pandas/pandas/core/indexes/base.py
Lines 3024 to 3036 in b5958ee
where
target
is the target index that's tz-aware. However once converted totarget_values
, the tz info disappears from the numpy array.I found a working solution but unsure if this behavior affects any other parts functionalities
Expected Output
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: