- 用法:- property DatetimeIndex.is_month_end
- 指示日期是否是该月的最后一天。 - 系列或阵列
- 对于 Series,返回具有布尔值的 Series。对于 DatetimeIndex,返回一个布尔数组。 
 
 - 返回:- 例子:- 此方法在具有日期时间值的系列上可用,位于 - .dt访问器下,并且直接在 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])
相关用法
- Python pandas.DatetimeIndex.is_month_start用法及代码示例
- Python pandas.DatetimeIndex.is_year_start用法及代码示例
- Python pandas.DatetimeIndex.is_quarter_start用法及代码示例
- Python pandas.DatetimeIndex.is_leap_year用法及代码示例
- Python pandas.DatetimeIndex.is_year_end用法及代码示例
- Python pandas.DatetimeIndex.is_quarter_end用法及代码示例
- Python pandas.DatetimeIndex.day用法及代码示例
- Python pandas.DatetimeIndex.dayofweek用法及代码示例
- Python pandas.DatetimeIndex.to_frame用法及代码示例
- Python pandas.DatetimeIndex.normalize用法及代码示例
- Python pandas.DatetimeIndex.tz_convert用法及代码示例
- Python pandas.DatetimeIndex.month用法及代码示例
- Python pandas.DatetimeIndex.floor用法及代码示例
- Python pandas.DatetimeIndex.round用法及代码示例
- Python pandas.DatetimeIndex.month_name用法及代码示例
- Python pandas.DatetimeIndex.year用法及代码示例
- Python pandas.DatetimeIndex.nanosecond用法及代码示例
- Python pandas.DatetimeIndex.hour用法及代码示例
- Python pandas.DatetimeIndex.day_name用法及代码示例
- Python pandas.DatetimeIndex.tz_localize用法及代码示例
注:本文由纯净天空筛选整理自pandas.pydata.org大神的英文原创作品 pandas.DatetimeIndex.is_month_end。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
