def find_weekend_indices(datetime_array):
    indices = []
for i in range(len(datetime_array)):
    if datetime_array[i].weekday() >= 5:
        indices.append(i)
return indices

def highlight_weekend(weekend_indices, ax):
    i = 0
while i < len(weekend_indices):
    ax.axvspan(weekend_indices[i], weekend_indices[i] + 2, facecolor=
        'green', edgecolor='none', alpha=0.2)
i += 2
Pandas Plots: отдельный цвет для выходных, красивое время печати по оси x