I’ve got a CSV with agency names and addresses. If I want a string of agency names with the same address (specifically the same zip code), how can I do that in R or Python? Whichever way is most efficient is preferable, but I’m still learning both. Google Refine gave me the counts of each zip code cluster already, but I just need to know which agencies correspond to those zips.
PS. Yes I know zip code isn’t good to rely upon; the point of this is to illustrate that.
Example input data:

Final output (to be merged with shapefiles later):

You should be able to just construct a dictionary:
Now,
agenciescontains a mapping of zip codes to agencies.