I have a csv with data that looks like this:
777 Brockton Avenue,Abington,MA,2351
30 Memorial Drive,Avon,MA,2322
250 Hartford Avenue,Bellingham,MA,2351
700 Oak Street,Brockton,MA,2301
66-4 Parkhurst Rd,Chelmsford,MA,1824
591 Memorial Dr,Chicopee,MA,2351
55 Brooksby Village Way,Danvers,MA,2301
I want to search the last column (the one with the zipcodes), find any duplicates and remove any row that doesn't have a duplicate in that row.
So the data above would turn into:
777 Brockton Avenue,Abington,MA,2351
250 Hartford Avenue,Bellingham,MA,2351
700 Oak Street,Brockton,MA,2301
591 Memorial Dr,Chicopee,MA,2351
55 Brooksby Village Way,Danvers,MA,2301
I have tried using Pandas and a lot of other methods but I am still having a lot of trouble doing this. Does anyone have any ideas on how I could do this?