pandas.Timestamp.hour#

Timestamp.hour#

Return the hour of the Timestamp.

Returns:
int

The hour of the Timestamp.

See also

Timestamp.minute

Return the minute of the Timestamp.

Timestamp.second

Return the second of the Timestamp.

Examples

>>> ts = pd.Timestamp("2024-08-31 16:16:30")
>>> ts.hour
16