pandas.Timestamp.year#

Timestamp.year#

Return the year of the Timestamp.

Returns:
int

The year of the Timestamp.

See also

Timestamp.month

Return the month of the Timestamp.

Timestamp.day

Return the day of the Timestamp.

Examples

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