LLM output with first draft code (V1)
<execute_python>
import matplotlib.pyplot as plt
# Filter for Q1 sales in 2024 and 2025
df_q1 = df[(df['quarter'] == 1) & (df['year'].isin([2024, 2025]))]
# Group by year and coffee_name, summing the price
sales_summary = df_q1.groupby(['year', 'coffee_name'])['price'].sum().unstack()
# Plot
fig, ax = plt.subplots(figsize=(10, 6))
sales_summary.plot(kind='bar', ax=ax)
ax.set_title('Q1 Coffee Sales Comparison: 2024 vs 2025')
ax.set_xlabel('Year')
ax.set_ylabel('Total Sales')
ax.legend(title='Coffee Name')
plt.xticks(rotation=0)
plt.tight_layout()
plt.savefig('drink_sales_v1.png', dpi=300)
plt.close()
</execute_python>