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

Small bug in displaying groupby with pandas data frame #59

Open
Shashank545 opened this issue Jul 27, 2023 · 0 comments
Open

Small bug in displaying groupby with pandas data frame #59

Shashank545 opened this issue Jul 27, 2023 · 0 comments

Comments

@Shashank545
Copy link

So in 01 - Data Exploration.ipynb notebook we have
print(df_students.groupby(df_students.Pass)['StudyHours', 'Grade'].mean()) , but this gives an error below.
ValueError: Cannot subset columns with a tuple with more than one element. Use a list instead.

Solution:

Change it to print(df_students.groupby(df_students.Pass)[['StudyHours', 'Grade']].mean()) to fix and resolve it.

Note:
A very small but important fix.

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