dr/python/group.py
Guillem Borrell c1d46c68a4
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Make Python groupby a little faster
2022-11-27 18:27:36 +00:00

7 lines
157 B
Python
Executable file

#!/usr/bin/env python3
import sys
import pandas as pd
df = pd.read_csv(sys.stdin)
print(df.groupby("Dept", sort=False, as_index=False).Weekly_Sales.mean())