Skip to content

Instantly share code, notes, and snippets.

@MaximePawlakFr
Created February 6, 2019 12:39
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 MaximePawlakFr/5192331bc66758e5b9ec04261394fc0c to your computer and use it in GitHub Desktop.
Save MaximePawlakFr/5192331bc66758e5b9ec04261394fc0c to your computer and use it in GitHub Desktop.
df_villes = df.merge(df_final, how="left", left_on="prec_str_position", right_on="str_position")
df_villes = df_villes.merge(df_final, how="left", left_on="interv_str_position", right_on="str_position")
df_villes = df_villes.rename(columns={"ville_x":"prec_ville", "ville_y":"interv_ville"})
columns_to_keep = ["prec_ville", "interv_ville", "counts"]
df_villes[columns_to_keep].head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment