pandas.Period.year#

Period.year#

返回 Period 所属的年份。

Examples

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