The .is_quarter_start
attribute of the Pandas.Timestamp object, which is an equivalent of Python's datetime object, is used to check if the date is the first day of the quarter or not.
The .is_quarter_start
attribute takes the following syntax:
Timestamp.is_quarter_start
Since .is_quarter_start
is an attribute, it takes no parameter value.
The .is_quarter_start
attribute returns a Boolean value indicating if the date is the last day of the quarter (True
) or not (False
).
# A code to illustrate the .is_quarter_end attribute in Pandas # importing the pandas library import pandas as pd # creating a Timestamp object a = pd.Timestamp(2022, 4, 30) b = pd.Timestamp(2022, 4, 1) # checking if date is the first day of the quarter print(a.is_quarter_start) print(b.is_quarter_start)
pandas
library.a
and b
, representing the month of June. .is_quarter_start
.RELATED TAGS
CONTRIBUTOR
View all Courses