pyspark.pandas.Series.dt.is_quarter_end

property dt.is_quarter_end

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

Returns
is_quarter_endSeries

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_start

Similar property 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: int64
>>> df.dates.dt.is_quarter_start
0    False
1    False
2     True
3    False
Name: dates, dtype: bool