Skip to content

Instantly share code, notes, and snippets.

@liannewriting
Last active January 21, 2020 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liannewriting/3856030c7880aa0ff6e5c44c10d5bf85 to your computer and use it in GitHub Desktop.
Save liannewriting/3856030c7880aa0ff6e5c44c10d5bf85 to your computer and use it in GitHub Desktop.
data_cleaning_202001
# replace missing values with the median.
med = df['life_sq'].median()
print(med)
df['life_sq'] = df['life_sq'].fillna(med)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment