Skip to main content
`Ctrl`+`K`

# pandas.Timedelta.floor

Timedelta.floor(freq)

  Return a new Timedelta floored to this resolution.

  Parameters:
    freq str

      Frequency string indicating the flooring resolution. It uses the same units as class constructor `Timedelta`.

  Returns:
    Timedelta

      A new Timedelta object floored to the specified resolution.

  See also

  `Timestamp.ceil`

    Round the Timestamp up to the nearest specified resolution.

  `Timestamp.round`

    Round the Timestamp to the nearest specified resolution.

  Examples

      >>> td = pd.Timedelta('1001ms')
      >>> td
      Timedelta('0 days 00:00:01.001000')
      >>> td.floor('s')
      Timedelta('0 days 00:00:01')