Compare commits
No commits in common. "51964de52c4c0e1a046d89bd36aa2e7b1aa4c34b" and "e18a3f062fa0dc6eafd73507b4ce3aa5749a13d2" have entirely different histories.
51964de52c
...
e18a3f062f
@ -1,6 +1,4 @@
|
||||
ruff == 0.15.1
|
||||
black == 26.1.0
|
||||
pytest == 9.0.2
|
||||
pre-commit == 4.5.1
|
||||
matplotlib == 3.10.8
|
||||
pandas == 3.0.1
|
||||
pre-commit == 4.5.1
|
||||
@ -1,8 +0,0 @@
|
||||
from analysis.io import read_csv
|
||||
from analysis.metrics import revenue
|
||||
|
||||
if __name__ == "__main__":
|
||||
df = read_csv("analysis/csv/sales.csv")
|
||||
print(df)
|
||||
df = revenue(df)
|
||||
print(df)
|
||||
@ -1,11 +0,0 @@
|
||||
day,product,quantity,unit_price,region
|
||||
Mon,Notebook,3,899.0,West
|
||||
Mon,Mouse,12,25.0,West
|
||||
Tue,Notebook,2,899.0,Ost
|
||||
Tue,Keyboard,5,70.0,Ost
|
||||
Wed,Monitor,4,220.0,West
|
||||
Wed,Mouse,10,25.0,Nord
|
||||
Thu,Keyboard,6,70.0,Sued
|
||||
Thu,Monitor,3,220.0,Ost
|
||||
Fri,Notebook,1,899.0,Nord
|
||||
Fri,Mouse,15,25.0,Sued
|
||||
|
@ -1,5 +0,0 @@
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def read_csv(file: str) -> pd.DataFrame:
|
||||
return pd.read_csv(file)
|
||||
@ -1,6 +0,0 @@
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def revenue(df: pd.DataFrame) -> pd.DataFrame:
|
||||
revenue = df["quantity"] * df["unit_price"]
|
||||
return revenue.groupby("day").sum()
|
||||
Loading…
x
Reference in New Issue
Block a user