pandas.Period¶
-
class
pandas.Period¶ Represents a period of time
Parameters: value : Period or str, default None
The time period represented (e.g., ‘4Q2005’)
freq : str, default None
One of pandas period strings or corresponding objects
year : int, default None
month : int, default 1
quarter : int, default None
day : int, default 1
hour : int, default 0
minute : int, default 0
second : int, default 0
Attributes
dayGet day of the month that a Period falls on. dayofweekDay of the week the period lies in, with Monday=0 and Sunday=6. dayofyearReturn the day of the year. days_in_monthGet the total number of days in the month that this period falls on. daysinmonthGet the total number of days of the month that the Period falls in. end_timefreqfreqstrhourGet the hour of the day component of the Period. is_leap_yearminuteGet minute of the hour component of the Period. monthordinalquarterqyearFiscal year the Period lies in according to its starting-quarter. secondGet the second component of the Period. start_timeGet the Timestamp for the start of the period. weekGet the week of the year on the given Period. weekdayDay of the week the period lies in, with Monday=0 and Sunday=6. weekofyearyearMethods
asfreqConvert Period to desired frequency, either at the start or end of the interval nowstrftimeReturns the string representation of the Period, depending on the selectedfmt.to_timestampReturn the Timestamp representation of the Period at the target frequency at the specified end (how) of the Period