new file: aggregates/a-b project/code.py new file: aggregates/codecademy_code/script.py new file: aggregates/codecademy_code/test1.py modified: aggregates/orders.csv new file: aggregates/python-aggregatesI.py new file: aggregates/python-aggregatesII.py new file: aggregates/python-aggregatesIII.py new file: aggregates/python-aggregatesIV.py new file: aggregates/python-aggregatesV.py Added aggregate files
11 lines
271 B
Python
11 lines
271 B
Python
import pandas as pd
|
|
|
|
orders = pd.read_csv('orders.csv')
|
|
|
|
print(orders.head(10))
|
|
|
|
pricey_shoes = orders.groupby('shoe_type').price.max().reset_index()
|
|
cheap_shoes = orders.groupby('shoe_color').price.apply(lambda x: np.percentile(x, 25)).reset_index()
|
|
|
|
print(cheap_shoes)
|