pandas.tseries.offsets.DateOffset.rollback — pandas 3.0.0rc0+33.g1fd184de2a documentation (original) (raw)

DateOffset.rollback(dt)#

Roll provided date backward to next offset only if not on offset.

Parameters:

dtdatetime or Timestamp

Timestamp to rollback.

Returns:

TimeStamp

Rolled timestamp if not on offset, otherwise unchanged timestamp.