Python | Pandas Timestamp.hour Last Updated : 08 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.hour attribute return the value of the hour for the given Timestamp object. Syntax : Timestamp.hour Parameters : None Return : hour Example #1: Use Timestamp.hour attribute to find out the hour value in the given Timestamp object. Python3 # importing pandas as pd import pandas as pd # Create the Timestamp object ts = pd.Timestamp(2017, 2, 15, 12) # Print the Timestamp object print(ts) Output : Now we will use the Timestamp.hour attribute to find out hour value in the given Timestamp object. Python3 # return the hour value ts.hour Output : As we can see in the output, the Timestamp.hour attribute has returned 12 as the hour value for the given Timestamp object. Example #2: Use Timestamp.hour attribute to find out the hour value in the given Timestamp object. Python3 # importing pandas as pd import pandas as pd # Create the Timestamp object ts = pd.Timestamp(year = 2009, month = 10, day = 21, hour = 4, tz = 'Europe/Berlin') # Print the Timestamp object print(ts) Output : Now we will use the Timestamp.hour attribute to find out hour value in the given Timestamp object. Python3 # return the hour value ts.hour Output : As we can see in the output, the Timestamp.hour attribute has returned 4 as the hour value for the given Timestamp object. Comment More infoAdvertise with us Next Article Python | Pandas Timestamp.day S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python-pandas Python Pandas-Timestamp Practice Tags : python Similar Reads Python | Pandas Timestamp.now Python is a great language for 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 Timestamp.now() function returns the current time in the local timezone. It is Equiv 3 min read Python | Pandas Timestamp.floor 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.floor() function return a new Timestamp floored to this resolution. T 2 min read Python | Pandas Timestamp.dst 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.dst() function return a timedelta object which contains self.tzinfo.d 2 min read Python | Pandas Timestamp.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 Timestamp.day attribute return the value of the day in the given Timestamp obje 2 min read Python | Pandas Timestamp.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 Timestamp.minute attribute return the minute value in the given Timestamp objec 2 min read Python | Pandas Timestamp.date 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.date() function return a datetime object with same year, month and da 2 min read Like