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 on day 45 while Feature Splitting #37

Open
AbdullahAssi opened this issue Jan 15, 2024 · 0 comments
Open

Issue on day 45 while Feature Splitting #37

AbdullahAssi opened this issue Jan 15, 2024 · 0 comments

Comments

@AbdullahAssi
Copy link

in the day 45 while doing groupby of 'Title and Survived' Error is occuring because of datatype.

Error can be solved by using this code.

`df['Survived'] = pd.to_numeric(df['Survived'], errors='coerce') # Convert to numeric, coerce errors to NaN

result = df.groupby('Title')['Survived'].mean().sort_values(ascending=False)

result.head()`

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