pyspark.pandas.Series.dt.is_month_start¶
-
property
dt.
is_month_start
¶ Indicates whether the date is the first day of the month.
- Returns
- Series
For Series, returns a Series with boolean values.
See also
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.>>> s = ps.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