pyspark.pandas.DatetimeIndex.normalize¶
-
DatetimeIndex.
normalize
() → pyspark.pandas.indexes.datetimes.DatetimeIndex¶ 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 timezones are unaffected.
This method is available on Series with datetime values under the
.dt
accessor.- Returns
- DatetimeIndex
The same type as the original data.
See also
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)