VOOZH about

URL: https://www.geeksforgeeks.org/python/how-to-determine-period-range-with-frequency-in-pandas/

⇱ How to determine Period Range with Frequency in Pandas? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to determine Period Range with Frequency in Pandas?

Last Updated : 25 May, 2021

In pandas, we can determine Period Range with Frequency with the help of period_range(). pandas.period_range() is one of the general functions in Pandas which 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 PeriodIndex

Returns: PeriodIndex

Example 1:

Output:

πŸ‘ Image


 

Example

Output:


 

πŸ‘ Image


 

Example 3:


 

Output:

πŸ‘ Image


 

Comment