Skip to content

Commit 4f2dced

Browse files
committed
BUG: Fix dt64[non_nano] + offset rounding
1 parent e27110a commit 4f2dced

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/arrays/datetimes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
tzconversion,
4747
)
4848
from pandas._libs.tslibs.dtypes import abbrev_to_npy_unit
49-
from pandas._libs.tslibs.offsets import DateOffset
5049
from pandas.errors import PerformanceWarning
5150
from pandas.util._exceptions import find_stack_level
5251
from pandas.util._validators import validate_inclusive
@@ -72,6 +71,7 @@
7271

7372
from pandas.tseries.frequencies import get_period_alias
7473
from pandas.tseries.offsets import (
74+
DateOffset as TSeriesDateOffset,
7575
Day,
7676
Tick,
7777
)
@@ -826,7 +826,7 @@ def _add_offset(self, offset: BaseOffset) -> Self:
826826
]
827827
res_unit = self.unit
828828
if hasattr(offset, "offset") and offset.offset is not None:
829-
if not isinstance(offset, DateOffset):
829+
if not isinstance(offset, TSeriesDateOffset):
830830
offset_td = Timedelta(offset.offset)
831831
if offset_td.value != 0:
832832
offset_unit = offset_td.unit

0 commit comments

Comments
 (0)