pandas.Timestamp.ceil — pandas 1.0.5 documentation (original) (raw)

Timestamp. ceil(self, freq, ambiguous='raise', nonexistent='raise')

return a new Timestamp ceiled to this resolution.

Parameters

freqstr

Frequency string indicating the ceiling resolution.

ambiguousbool or {‘raise’, ‘NaT’}, default ‘raise’

The behavior is as follows:

New in version 0.24.0.

nonexistent{‘raise’, ‘shift_forward’, ‘shift_backward, ‘NaT’, timedelta}, default ‘raise’

A nonexistent time does not exist in a particular timezone where clocks moved forward due to DST.

New in version 0.24.0.

Raises

ValueError if the freq cannot be converted.