import pandas as pd # 1) Set the file path for the original CSV file = '/home/user/cities.csv' # 2) Set the file path for the deduped CSV file_clean = '/home/cleaned_cities.csv' # If the separator is different than a comma, you can specify it in the value of the 'sep' property. # For example if the separator is a tab, you can use "\t" df = pd.read_csv(file, sep=",") df.drop_duplicates(subset=None, inplace=True) df.to_csv(file_clean)