A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/pandas-docs/stable/reference/api/../api/pandas.Period.days_in_month.html below:

pandas.Period.days_in_month — pandas 2.3.1 documentation

pandas.Period.days_in_month#
Period.days_in_month#

Get the total number of days in the month that this period falls on.

Returns:
int

See also

Period.daysinmonth

Gets the number of days in the month.

DatetimeIndex.daysinmonth

Gets the number of days in the month.

calendar.monthrange

Returns a tuple containing weekday (0-6 ~ Mon-Sun) and number of days (28-31).

Examples

>>> 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4