Skip to content

Instantly share code, notes, and snippets.

@russbiggs
Created August 23, 2020 17:44
Show Gist options
  • Save russbiggs/94f6c6e32156f87329e39f1d516c8fdb to your computer and use it in GitHub Desktop.
Save russbiggs/94f6c6e32156f87329e39f1d516c8fdb to your computer and use it in GitHub Desktop.
count duplicate USPS collection boxes by lat/lng
import pandas as pd
df = pd.read_csv("collection_boxes.csv")
df = df[['OUTLETID','LATITUDE','LONGITUDE']]
duplicates = df[df.duplicated(['LATITUDE','LONGITUDE'], keep=False)]
print(f'duplicates {duplicates.shape[0]}')
print(duplicates.groupby(by=['LATITUDE','LONGITUDE']).size())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment