- API reference
- pandas arrays, scalars, and data types
- pandas.Period.qyear
pandas.Period.qyear#
- Period.qyear#
Fiscal year the Period lies in according to its starting-quarter.
Theyear and theqyear of the period will be the same if the fiscaland calendar years are the same. When they are not, the fiscal yearcan be different from the calendar year of the period.
- Returns:
- int
The fiscal year of the period.
See also
Period.year
Return the calendar year of the period.
Examples
If the natural and fiscal year are the same,qyear andyear willbe the same.
>>>per=pd.Period('2018Q1',freq='Q')>>>per.qyear2018>>>per.year2018
If the fiscal year starts in April (Q-MAR), the first quarter of2018 will start in April 2017.year will then be 2017, butqyearwill be the fiscal year, 2018.
>>>per=pd.Period('2018Q1',freq='Q-MAR')>>>per.start_timeTimestamp('2017-04-01 00:00:00')>>>per.qyear2018>>>per.year2017
On this page