Pandas Series property: dt.is_quarter_start
Series.dt.is_quarter_start property
The is_quarter_start property is used to check whether a given date is the first day of a quarter or not.
Syntax:
Series.dt.is_quarter_start
Returns: is_quarter_start : Series or DatetimeIndex
The same type as the original data with boolean values. Series will have the same name and index. DatetimeIndex will have the same name.
Example:
Python-Pandas Code:
Output:
dates quarter is_quarter_start 0 2019-03-30 1 False 1 2019-03-31 1 False 2 2019-04-01 2 True 3 2019-04-02 2 False
Python-Pandas Code:
Output:
DatetimeIndex(['2019-03-30', '2019-03-31', '2019-04-01', '2019-04-02'], dtype='datetime64[ns]', freq='D')
Python-Pandas Code:
Output:
array([False, False, True, False])
Previous: Series.dt.is_month_end property
Next: Series.dt.is_quarter_end property