pandas.Period¶
-
class
pandas.
Period
(value=None, freq=None, ordinal=None, year=None, month=None, quarter=None, day=None, hour=None, minute=None, second=None)¶ Represents a period of time.
- Parameters
- valuePeriod or str, default None
The time period represented (e.g., ‘4Q2005’).
- freqstr, default None
One of pandas period strings or corresponding objects.
- ordinalint, default None
The period offset from the proleptic Gregorian epoch.
- yearint, default None
Year value of the period.
- monthint, default 1
Month value of the period.
- quarterint, default None
Quarter value of the period.
- dayint, default 1
Day value of the period.
- hourint, default 0
Hour value of the period.
- minuteint, default 0
Minute value of the period.
- secondint, default 0
Second value of the period.
Attributes
Get day of the month that a Period falls on.
Day of the week the period lies in, with Monday=0 and Sunday=6.
Return the day of the year.
Day of the week the period lies in, with Monday=0 and Sunday=6.
Return the day of the year.
Get the total number of days in the month that this period falls on.
Get the total number of days of the month that the Period falls in.
Get the hour of the day component of the Period.
Get minute of the hour component of the Period.
Fiscal year the Period lies in according to its starting-quarter.
Get the second component of the Period.
Get the Timestamp for the start of the period.
Get the week of the year on the given Period.
Day of the week the period lies in, with Monday=0 and Sunday=6.
end_time
freq
freqstr
is_leap_year
month
ordinal
quarter
weekofyear
year
Methods
Convert Period to desired frequency, at the start or end of the interval.
Returns the string representation of the
Period
, depending on the selectedfmt
.Return the Timestamp representation of the Period.
now