pandas.Period.day#

Period.day#

Get day of the month that a Period falls on.

The value comes from the last day of the first unit of the period’s frequency, so a "2M" period uses the last day of its first month.

Returns:
int

See also

Period.dayofweek

Get the day of the week.

Period.dayofyear

Get the day of the year.

Period.start_time

Get the Timestamp for the start of the period.

Period.end_time

Get the Timestamp for the end of the period.

Examples

>>> p = pd.Period("2018-03-11", freq='h')
>>> p.day
11

A monthly period uses its last day, and "2M" uses the last day of its first month:

>>> pd.Period("2018-03", freq="M").day
31
>>> pd.Period("2018-02", freq="2M").day
28