The minute
attribute in Pandas is used to obtain the value of the minutes from the given Timestamp object. It is equivalent to Python's datetime
object.
Timestamp.minute
As an attribute, minute
takes no parameter value.
The minute
attribute returns an int
representing the minute value of the given date.
Let's look at the code below:
# A code to illustrate the minute attribute in Pandas# importing the pandas libraryimport pandas as pd# creating a date time objectmy_date = pd.Timestamp('2022-04-29T7:48:52.192548651')# obtaining the minute value from the given dateprint("The minute value from the Timestamp object is: ", my_date.minute)
datetime
) object and name it my_date
.my_date
, by using the minute
attribute, and we print it.