Skip to content

Instantly share code, notes, and snippets.

@shotleft
Last active December 30, 2018 12:50
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 shotleft/eb21457f5fef8b436ca0e0b8013ae088 to your computer and use it in GitHub Desktop.
Save shotleft/eb21457f5fef8b436ca0e0b8013ae088 to your computer and use it in GitHub Desktop.
Avoid_for_loops_3
df_list_events["Deduped_Events"] = df_list_events["Event"].apply(lambda x: [k for k, g in itertools.groupby(x)])
df_list_events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment