Reputation: 99
I have a dataset with many missing values in Gender
.
The path I took, which is probably not the best is first creating a variable with the genders.
Gender = dataset['Gender'].isin(['M', 'F'])
And now merging this series with the dataframe.
dataset1 = pd.DataFrame.merge(dataset, Gender)
This of course, it´s not working.
How can I solve this? Ty
Upvotes: 0
Views: 36
Reputation: 71580
Do you mean by?
dataset.loc[dataset['Gender'].isin(['M', 'F'])]
Upvotes: 1