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