pandas_exercises
pandas_exercises copied to clipboard
01_Getting_&_Knowing_Your_Data - Chipotle - Total Revenue Incorrect
In the chipotle dataset I believe the total revenue is incorrect.
It assumes that the quantity must be multiplied by the price to get the the total.
(chipo['quantity']* chipo['item_price']).sum()
However, I believe that the quantity is already included in the price, as can be seen by examining
chipo[chipo['item_name'] == '6 Pack Soft Drink']
It think the following is sufficient.
chipo['item_price']).sum()
That's correct. I did it the same way you did.