Python | Pandas Timestamp.to_period Last Updated : 27 Jan, 2019 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 Timestamp.to_period() function return a period object for which the given Timestamp is an observation. Syntax :Timestamp.to_period() Parameters : freq : time series frequency Return : period object Example #1: Use Timestamp.to_period() function to convert the given Timestamp to a period object. Python3 # importing pandas as pd import pandas as pd # Create the Timestamp object ts = pd.Timestamp(year = 2011, month = 11, day = 21, hour = 10, second = 49, tz = 'US/Central') # Print the Timestamp object print(ts) Output : Now we will use the Timestamp.to_period() function to convert the given Timestamp to period. Python3 # convert to period # we have applied monthly frequency ts.to_period(freq ='M') Output : As we can see in the output, the Timestamp.to_period() function has converted the given Timestamp object into a period object. Example #2: Use Timestamp.to_period() function to convert the given Timestamp to a period object. Python3 # importing pandas as pd import pandas as pd # Create the Timestamp object ts = pd.Timestamp(year = 2009, month = 5, day = 31, hour = 4, second = 49, tz = 'Europe/Berlin') # Print the Timestamp object print(ts) Output : Now we will use the Timestamp.to_period() function to convert the given Timestamp to period. Python3 # convert to period # we have applied minutely frequency ts.to_period(freq ='T') Output : As we can see in the output, the Timestamp.to_period() function has converted the given Timestamp object into a period object. Comment More infoAdvertise with us Next Article Python | Pandas PeriodIndex.to_timestamp S Shubham__Ranjan Follow Improve Article Tags : Pandas Python-pandas Python Pandas-Timestamp AI-ML-DS With Python Similar Reads Python | Pandas Period.to_timestamp 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.to_timestamp() function return the Timestamp representation of the Perio 2 min read Python | Pandas PeriodIndex.to_timestamp 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 PeriodIndex.to_timestamp() function casts the given PeriodIndex object to Datet 2 min read Python | Pandas Timestamp.to_pydatetime 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 Timestamp.to_pydatetime() function convert a Timestamp object to a native Pytho 2 min read 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.start_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.start_time attribute returns a Timestamp object containing the start tim 2 min read Python | Pandas Period.strftime 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.strftime() function returns the string representation of the Period, dep 2 min read Like