Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ex1 - Filterong and Sorting Data - Price is ill defined #62

Open
simonkenny opened this issue Oct 10, 2018 · 2 comments
Open

Ex1 - Filterong and Sorting Data - Price is ill defined #62

simonkenny opened this issue Oct 10, 2018 · 2 comments

Comments

@simonkenny
Copy link

Steps 4 and 5 assume that each price has a unique price.

However,
chipo[(chipo['item_name'] == 'Chicken Bowl') & (chipo['quantity'] == 1)].item_price.unique()
returns
array([10.98, 11.25, 8.75, 8.49, 8.19, 10.58, 8.5 ])

This is covered by the drop_duplicates, however is still misleading as they aren't duplicate with price.

@guipsamora
Copy link
Owner

Got it, this is probably due to extras on "choice_description" column influencing the final price. What would be your suggestion to improve the exercise?

@jonathanmcmahon
Copy link

Everyone knows that guac is gonna cost extra. 😆

This was my solution.

>>> chipo[(chipo["item_price"] > 10) & (chipo["quantity"] == 1)].item_name.nunique()
25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants