pandas.period_range()
— this is one of the main functions in Pandas that is used to return a fixed frequency PeriodIndex, with the day (calendar) as the default frequency.
Syntax: pandas.to_numeric ( arg, errors = ’raise’, downcast = None)
Parameters:
start: Left bound for generating periods
end: Right bound for generating periods
periods: Number of periods to generate
freq: Frequency alias
name: Name of the resulting PeriodIndexReturns: PeriodIndex
Code # 1:
|
Output:
Code # 2:
|
Output:
Code # 3:
|
Output: