用法:
Period.qyear
根據其starting-quarter,期間所在的會計年度。
如果會計年度和日曆年度相同,則期間的
year
和qyear
將相同。如果不是,則會計年度可能與該期間的日曆年度不同。- int
期間的會計年度。
返回:
例子:
如果自然年度和會計年度相同,則
qyear
和year
將相同。>>> per = pd.Period('2018Q1', freq='Q') >>> per.qyear 2018 >>> per.year 2018
如果財年從 4 月開始 (
Q-MAR
),則 2018 年第一季度將從 2017 年 4 月開始。year
將是 2018 年,但qyear
將是 2018 財年。>>> per = pd.Period('2018Q1', freq='Q-MAR') >>> per.start_time Timestamp('2017-04-01 00:00:00') >>> per.qyear 2018 >>> per.year 2017
相關用法
- Python pandas.Period.strftime用法及代碼示例
- Python pandas.Period.dayofyear用法及代碼示例
- Python pandas.Period.day用法及代碼示例
- Python pandas.Period.minute用法及代碼示例
- Python pandas.Period.dayofweek用法及代碼示例
- Python pandas.Period.day_of_week用法及代碼示例
- Python pandas.Period.week用法及代碼示例
- Python pandas.Period.day_of_year用法及代碼示例
- Python pandas.Period.days_in_month用法及代碼示例
- Python pandas.Period.daysinmonth用法及代碼示例
- Python pandas.Period.hour用法及代碼示例
- Python pandas.Period.weekday用法及代碼示例
- Python pandas.Period.second用法及代碼示例
- Python pandas.Period.weekofyear用法及代碼示例
- Python pandas.Period.start_time用法及代碼示例
- Python pandas.PeriodIndex用法及代碼示例
- Python pandas.PeriodIndex.asfreq用法及代碼示例
- Python pandas.PeriodIndex.strftime用法及代碼示例
- Python pandas.PeriodDtype用法及代碼示例
- Python pandas.arrays.IntervalArray.is_empty用法及代碼示例
注:本文由純淨天空篩選整理自pandas.pydata.org大神的英文原創作品 pandas.Period.qyear。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。