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 in df.corr() in day 19 class #43

Open
shadab12py opened this issue Jul 23, 2024 · 3 comments
Open

issue in df.corr() in day 19 class #43

shadab12py opened this issue Jul 23, 2024 · 3 comments

Comments

@shadab12py
Copy link

this show this bug , ValueError: could not convert string to float: 'Braund, Mr. Owen Harris' . plz suggest a sol
Screenshot (80)

@stoicsapien1
Copy link

Use df.corr(numeric_only=True)

1 similar comment
@yaswanthreddy3
Copy link

Use df.corr(numeric_only=True)

@saumyayadav25
Copy link

numeric_columns = ['PassengerId', 'Survived', 'Pclass', 'Age', 'SibSp', 'Parch', 'Fare']
correlation_matrix = df[numeric_columns].corr()

use df.corr for numerical data only. The above code should work

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

4 participants