pyspark.pandas.Series.dt.is_quarter_start#

dt.is_quarter_start#

Indicator for whether the date is the first day of a quarter.

Returns
is_quarter_startSeries

The same type as the original data with boolean values. Series will have the same name and index.

See also

quarter

Return the quarter of the date.

is_quarter_end

Similar property for indicating the quarter start.

Examples

This method is available on Series with datetime values under the .dt accessor.

>>> df = ps.DataFrame({'dates': pd.date_range("2017-03-30",
...                   periods=4)})
>>> df
       dates
0 2017-03-30
1 2017-03-31
2 2017-04-01
3 2017-04-02
>>> df.dates.dt.quarter
0    1
1    1
2    2
3    2
Name: dates, dtype: int32
>>> df.dates.dt.is_quarter_start
0    False
1    False
2     True
3    False
Name: dates, dtype: bool