File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -826,17 +826,11 @@ def _add_offset(self, offset: BaseOffset) -> Self:
826826 ]
827827 res_unit = self .unit
828828 if type (offset ) is DateOffset :
829- nano = offset .kwds .get ("nanoseconds" , 0 )
830- micro = offset .kwds .get ("microseconds" , 0 )
831- if nano :
829+ if "nanoseconds" in offset .kwds :
832830 res_unit = "ns"
833- elif micro and self .unit != "ns" :
831+ elif "microseconds" in offset . kwds and self .unit != "ns" :
834832 res_unit = "us"
835- if (
836- hasattr (offset , "offset" )
837- and offset .offset is not None
838- and not isinstance (offset , Tick )
839- ):
833+ if hasattr (offset , "offset" ) and offset .offset is not None :
840834 offset_td = Timedelta (offset .offset )
841835 if offset_td .value != 0 :
842836 offset_unit = offset_td .unit
You can’t perform that action at this time.
0 commit comments