The Period.day
attribute in pandas is used to obtain the particular day of the month that a Period
object falls on. A Period
object here represents a period of time.
The Period.day
attribute has the following syntax:
Period.day
Because Period.day
is an attribute, it does not take any parameter values.
The Period.day
attribute returns an int
that indicates the day of the month for that period.
# A code to illustrate the Period.day attribute in Pandas# importing the pandas libraryimport pandas as pd# creating a perioda = pd.Period("2022-05-01")print(a.day)
pandas
library.Period
object a
. Period
object using the attribute Period.day
, and print the value to the console.