Period.days_in_month Get the total number of days in the month that this period falls on.
| Returns: |
|
|---|
See also
Period.daysinmonth
DatetimeIndex.daysinmonth calendar.monthrange
>>> p = pd.Period('2018-2-17')
>>> p.days_in_month
28
>>> pd.Period('2018-03-01').days_in_month
31
Handles the leap year case as well:
>>> p = pd.Period('2016-2-17')
>>> p.days_in_month
29
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Period.days_in_month.html