Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.DatetimeIndex.is_month_end#

propertyDatetimeIndex.is_month_end[source]#

Indicates whether the date is the last 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 underthe.dt accessor, and directly on DatetimeIndex.

>>>s=pd.Series(pd.date_range("2018-02-27",periods=3))>>>s0   2018-02-271   2018-02-282   2018-03-01dtype: datetime64[ns]>>>s.dt.is_month_start0    False1    False2    Truedtype: bool>>>s.dt.is_month_end0    False1    True2    Falsedtype: bool
>>>idx=pd.date_range("2018-02-27",periods=3)>>>idx.is_month_startarray([False, False, True])>>>idx.is_month_endarray([False, True, False])

[8]ページ先頭

©2009-2025 Movatter.jp