pandas.Period.year#

Period.year#

Return the year this Period falls on.

Examples

>>> period = pd.Period('2022-01', 'M')
>>> period.year
2022