Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
train_df.select("age").describe().show()
train_df.where("age is null").count()
#177 values out of the 714 values are null.
#replacing the null values with the mean age value
train_avg_age_df = train_df.na.fill({'age': 29})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.