Skip to content

Instantly share code, notes, and snippets.

@AnnikaNoren
Created July 25, 2020 13:21
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 AnnikaNoren/0a10ab82ce610040bc2d9fe3597117eb to your computer and use it in GitHub Desktop.
Save AnnikaNoren/0a10ab82ce610040bc2d9fe3597117eb to your computer and use it in GitHub Desktop.
df['renovation'] = df['yr_renovated'].fillna(pd.Series(np.random.choice([999, 0],
p=[744/17011, 1-(744/17011)],
size=len(df))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment