I have the following code:
import pandas as pd
df = pd.read_csv('/home/test/cities.csv')
dupes = df.drop_duplicates(subset=['latitude', 'longitude'], keep=False)
dupes.to_csv('/home/test/results.csv')
I want to drop all records with duplicate latitude and longitude information.
The output CSV file contains all the non-duplicated records.
Any suggestions on how to extract all the duplicate records?