Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Wann-Jiun
Last active January 19, 2017 23:32
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 Wann-Jiun/dd5f183af39023c43f760f24befb4e12 to your computer and use it in GitHub Desktop.
Save Wann-Jiun/dd5f183af39023c43f760f24befb4e12 to your computer and use it in GitHub Desktop.
all_df["LotFrontage"] = df["LotFrontage"]
for key, group in lot_frontage_by_neighborhood:
idx = (df["Neighborhood"] == key) & (df["LotFrontage"].isnull())
all_df.loc[idx, "LotFrontage"] = group.median()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment