Spaces:
Sleeping
Sleeping
import matplotlib.pyplot as plt | |
def plot_spending_by_category(df): | |
category_spending = df.groupby("Category")["Amount"].sum() | |
category_spending.plot(kind="bar", title="Spending by Category", figsize=(8, 5)) | |
plt.savefig("assets/spending_chart.png") |