File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 4545 tzconversion ,
4646)
4747from pandas ._libs .tslibs .dtypes import abbrev_to_npy_unit
48- from pandas ._libs .tslibs .timedeltas import Timedelta
4948from pandas .errors import PerformanceWarning
5049from pandas .util ._exceptions import find_stack_level
5150from pandas .util ._validators import validate_inclusive
8281 Iterator ,
8382 )
8483
84+ from pandas ._libs .tslibs .timedeltas import Timedelta
8585 from pandas ._typing import (
8686 ArrayLike ,
8787 DateTimeErrorChoices ,
@@ -824,13 +824,8 @@ def _add_offset(self, offset: BaseOffset) -> Self:
824824 "s" ,
825825 ]
826826 res_unit = self .unit
827- offset_td = getattr (offset , "offset" , None )
828- if (
829- offset_td is not None
830- and isinstance (offset_td , Timedelta )
831- and offset_td .value != 0
832- ):
833- ns = abs (int (offset_td .value ))
827+ if isinstance (offset , Tick ):
828+ ns = abs (int (offset .value ))
834829 if ns == 0 :
835830 eff_unit = self .unit
836831 elif ns % 1_000_000_000 == 0 :
You can’t perform that action at this time.
0 commit comments