Skip to content

Commit

Permalink
fix: resample using start of month
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-awd committed Sep 12, 2024
1 parent 63f95c6 commit 766df58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/pages/1_visualizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ def show_stacked_bar_chart(df: pd.DataFrame):
df["Income"] = df["amount"].apply(lambda x: x if x > 0 else 0)
df["Expenses"] = df["amount"].apply(lambda x: abs(x) if x < 0 else 0)
df = df.drop(columns=["description", "date"])
df = df.resample("ME").sum()
df = df.resample("MS").sum()

show_stacked_bar_chart(df)

0 comments on commit 766df58

Please sign in to comment.