![]() |
VOOZH | about |
In Pandas to determine Period Index and Column for Data Frame, we will use the pandas.period_range() method. It is one of the general functions in Pandas that is used to return a fixed frequency PeriodIndex, with 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
Example 1:
Output:
Example 2:
Output:
Example 3: