dr/python/group.py

7 lines
157 B
Python
Raw Normal View History

2022-11-20 23:00:58 +01:00
#!/usr/bin/env python3
import sys
import pandas as pd
df = pd.read_csv(sys.stdin)
2022-11-27 19:27:36 +01:00
print(df.groupby("Dept", sort=False, as_index=False).Weekly_Sales.mean())