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

Issue with the "# Get the product with the highest profit" section #1

Open
MichaelCervoni opened this issue Dec 20, 2021 · 0 comments

Comments

@MichaelCervoni
Copy link

Hi Derek,
Really like your videos! I think I noticed an error in this one.

for the line:
# Get the product with the highest profit
cs_df[['Profit','Product ID']].max(axis=0)

I think this is actually returning the max of each row, not the product with the highest profit. If you look at the product ID of the system with the highest output the answer should actually be GT13-0024.The profit of the answer Q526FA is only 143.09.

A way I found to get the correct answer is
cs_df[cs_df['Profit'] == cs_df['Profit'].max()][['Profit','Product ID']]
Again thanks for the videos, they are really helpfull!

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

1 participant