A RetroSearch Logo

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

Search Query:

Showing content from https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.is_month_start.html below:

pandas.DatetimeIndex.is_month_start — pandas 2.3.1 documentation

pandas.DatetimeIndex.is_month_start#
property DatetimeIndex.is_month_start[source]#

Indicates whether the date is the first day of the month.

Returns:
Series or array

For Series, returns a Series with boolean values. For DatetimeIndex, returns a boolean array.

See also

is_month_start

Return a boolean indicating whether the date is the first day of the month.

is_month_end

Return a boolean indicating whether the date is the last day of the month.

Examples

This method is available on Series with datetime values under the .dt accessor, and directly on DatetimeIndex.

>>> s = pd.Series(pd.date_range("2018-02-27", periods=3))
>>> s
0   2018-02-27
1   2018-02-28
2   2018-03-01
dtype: datetime64[ns]
>>> s.dt.is_month_start
0    False
1    False
2    True
dtype: bool
>>> s.dt.is_month_end
0    False
1    True
2    False
dtype: bool
>>> idx = pd.date_range("2018-02-27", periods=3)
>>> idx.is_month_start
array([False, False, True])
>>> idx.is_month_end
array([False, True, False])

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