Spaces:
Sleeping
Sleeping
File size: 260 Bytes
0f9a667 |
1 2 3 4 5 6 |
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") |