Skip to content

Fix pandas FutureWarning in twins dataset loading#37

Open
soni-ratnesh wants to merge 2 commits intovanderschaarlab:mainfrom
soni-ratnesh:main
Open

Fix pandas FutureWarning in twins dataset loading#37
soni-ratnesh wants to merge 2 commits intovanderschaarlab:mainfrom
soni-ratnesh:main

Conversation

@soni-ratnesh
Copy link

Fix pandas FutureWarning in twins dataset loading

The imputation logic for the 'twins' dataset was causing a FutureWarning due
to assigning a float (the mean) into an int64 column. This will raise a
TypeError in future versions of pandas.

Explicitly cast the relevant columns to float64 before performing the mean
imputation to ensure type compatibility.

Fix pandas FutureWarning in twins dataset loading

The imputation logic for the 'twins' dataset was causing a FutureWarning due
to assigning a float (the mean) into an int64 column. This will raise a
TypeError in future versions of pandas.

Explicitly cast the relevant columns to float64 before performing the mean 
imputation to ensure type compatibility.
Fix pandas FutureWarning in twins dataset loading
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

Successfully merging this pull request may close these issues.

1 participant