Open
Description
In 02-Filtering_and_Sorting/Chipotle, step 4 and 5,
- Solution doesn't consider items which do not have a 'quantity'==1 in the data
- They can be extracted by
chipo['item_price'] = chipo['item_price']/chipo['quantity']
chipo['quantity'] = 1 #Dividing item_price by quantity, therefore let quantity be 1
chipo.drop_duplicates(['item_name'], keep='first', inplace=True)
chipo.sort_values(by='item_price', ascending=False, inplace=True)
display(chipo[['item_name', 'item_price']])
I'm also a beginner at Pandas, please let me know about any stupid thing that I missed. Thanks.
Metadata
Metadata
Assignees
Labels
No labels