pandas.Timestamp.normalize — pandas 3.0.0rc0+33.g1fd184de2a documentation (original) (raw)
Timestamp.normalize()#
Normalize Timestamp to midnight, preserving tz information.
This method sets the time component of the Timestamp to midnight (00:00:00), while preserving the date and time zone information. It is useful when you need to standardize the time across different Timestamp objects without altering the time zone or the date.
Returns:
Timestamp
See also
Rounds Timestamp down to the nearest frequency.
Rounds Timestamp up to the nearest frequency.
Rounds Timestamp to the nearest frequency.
Examples
ts = pd.Timestamp(2020, 3, 14, 15, 30) ts.normalize() Timestamp('2020-03-14 00:00:00')