import pandas as pd def duplicate_check(df): duplicate_rows = df[df.duplicated()] print("Duplicate Rows:") print(duplicate_rows) df = df.drop_duplicates() # df.to_csv(f'{file.split(".")[0]}_f.csv', index=False) return df if __name__ == "__main__": file = "202007010000_202308310000_f.csv" duplicate_check(file)