Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created April 13, 2021 08:12
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 amankharwal/2d30fc09be5ab86368b56f4c6503c400 to your computer and use it in GitHub Desktop.
Save amankharwal/2d30fc09be5ab86368b56f4c6503c400 to your computer and use it in GitHub Desktop.
dict_ = {}
for i in df.vaccines.unique():
dict_[i] = [df["country"][j] for j in df[df["vaccines"]==i].index]
vaccines = {}
for key, value in dict_.items():
vaccines[key] = set(value)
for i, j in vaccines.items():
print(f"{i}:>>{j}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment