The .is_quarter_end
attribute of Pandas.Timestamp
(an equivalent of Python's Datetime object) is used to check if the date is the last day of the quarter or not.
Timestamp.is_quarter_end
This attribute takes no parameter value.
This attribute returns a Boolean value indicating if the date is the last day of the quarter. It returns True
if it is the last day and False
if not.
# 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, 6, 30) b = pd.Timestamp(2022, 6, 29) # checking if date is the last day of the quarter print(a.is_quarter_end) print(b.is_quarter_end)
pandas
library.Timestamp
objects, a
and b
, representing the month of June. .is_quarter_end
.RELATED TAGS
CONTRIBUTOR
View all Courses