Python | pandas.period_range() method Last Updated : 17 Dec, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. 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 Code #1: Python3 1== # importing pandas as pd import pandas as pd # period_range with freq = day per1 = pd.period_range(start ='2018-12-20', end ='2019-01-01', freq ='D') # period_range with freq = month per2 = pd.period_range(start ='2018-12-20', end ='2019-12-01', freq ='M') print(per1, "\n\n", per2) Output: Code #2: Python3 1== # importing pandas as pd import pandas as pd # period_range with freq = day per1 = pd.period_range(start ='2018-12-20', end ='2019-01-01', freq ='D') for val in per1: print(val) Output: Code #3: Python3 1== # importing pandas as pd import pandas as pd # Calling with pd.Period per = pd.period_range(start = pd.Period('2017Q1', freq ='Q'), end = pd.Period('2018Q2', freq ='Q'), freq ='M') for val in per: print(val) Output: Comment More infoAdvertise with us Next Article Python | Pandas Period.end_time S Shivam_k Follow Improve Article Tags : Python Python-pandas Python pandas-general-functions Practice Tags : python Similar Reads Python | Pandas Period.end_time Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Period.end_time attribute returns a Timestamp object containing the end time of 2 min read Python | Pandas Period.month Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Period.month attribute return an integer value. The returned value represents t 2 min read Python | pandas.date_range() method Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages that makes importing and analyzing data much easier. pandas.date_range() is one of the general functions in Pandas which is used to return 4 min read Python | Pandas Period.hour Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Period.hour attribute returns an integer value indicating the value of the hour 2 min read Python | Pandas Period.minute Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Period.minute attribute return an integer value. The returned value represents 2 min read Python | Pandas Period.day Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Period.day attribute returns the day of the month for the given Period object. 2 min read Like