DatetimeIndex.
normalize
Convert times to midnight.
The time component of the date-time is converted to midnight i.e. 00:00:00. This is useful in cases, when the time does not matter. Length is unaltered. The time zones are unaffected.
This method is available on Series with datetime values under the .dt accessor.
.dt
The same type as the original data.
See also
floor
Floor the series to the specified freq.
ceil
Ceil the series to the specified freq.
round
Round the series to the specified freq.
Examples
>>> idx = ps.date_range(start='2014-08-01 10:00', freq='H', periods=3) >>> idx.normalize() DatetimeIndex(['2014-08-01', '2014-08-01', '2014-08-01'], dtype='datetime64[ns]', freq=None)