Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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