DatetimeIndex.is_quarter_end
Pandas DatetimeIndex.is_quarter_end
is an indicator of whether the date is the last day of the quarter. If the date is the last day of the quarter it returns True
otherwise it returns False
.
Syntax: DatetimeIndex. is_quarter_end
Returns: numpy array containing logical values.
Example # 1: Use the attribute DatetimeIndex.is_quarter_end
to check if the dates in the DatetimeIndex are the last day of the quarter.
|
Output:
Now we want to find out if the dates are contained in this DatetimeIndex object as the last day of the quarter.
|
Exit:
As we can see in the output, the function returned an empty array containing boolean values for each entry in the DatetimeIndex object. True
values indicate that the corresponding date was the last day of the quarter, and False
values indicate that the corresponding date was not the last day of the quarter.
Example # 2: Use the DatetimeIndex.is_quarter_end
attribute to check if the dates in the DatetimeIndex are the last day of the quarter.
|
Output:
Now we want to find out whether the dates contained in this DatetimeIndex are the last day of the quarter.
|
Output:
As we can see in the output, the function returned an empty array containing boolean values for each entry in the DatetimeIndex object. True
values indicate that the corresponding date was the last day of the quarter, and False
values indicate that the corresponding date was not the last day of the quarter.