- API reference
- pandas.DatetimeIndex
- pandas.Datet...
pandas.DatetimeIndex.hour#
- propertyDatetimeIndex.hour[source]#
The hours of the datetime.
Examples
>>>datetime_series=pd.Series(...pd.date_range("2000-01-01",periods=3,freq="h")...)>>>datetime_series0 2000-01-01 00:00:001 2000-01-01 01:00:002 2000-01-01 02:00:00dtype: datetime64[ns]>>>datetime_series.dt.hour0 01 12 2dtype: int32
On this page