# First, group data by date and count the number of items sold each day daily_sales = bakery_data.groupby('Date')['Items'].count() # Identify which dates are weekends weekend_dates = bakery_data[bakery_data['DayType'] == 'Weekend']['Date'].unique() # Adding a legend entry for weekends using red crosses # Plotting the time series line plot again plt.figure(figsize=(15, 7)) plt.plot(daily_sales, label='Daily Items Sold', color='blue', alpha=0.7) # Marking weekends with red crosses for date, count in daily_sales.items(): if date in weekend_dates: plt.scatter(date, count, color='red', marker='x', s=50) # Using 'x' marker for weekends # Adding legend entries plt.legend(['Daily Items Sold', 'Weekend']) plt.title('Time Series of Daily Items Sold (Weekends Marked with Crosses)') plt.xlabel('Date') plt.ylabel('Number of Items Sold') plt.grid() plt.show()