Good morning! I am trying to remove duplicate rows from a csv file with panda. I have 2 files, A.csv and B.csv I want to delete all rows in A that exist in B.
File A.csv:
Pedro,10,rojo
Mirta,15,azul
Jose,5,violeta
File B.csv:
Pedro,
ignacio,
fernando,
federico,
Output file output.csv:
Mirta,15,azul
Jose,5,violeta
try to join the files and then apply
cat A.csv B.csv > output.csv
and run this program in python:
import pandas as pd
df = pd.read_csv('output.csv')
df.drop_duplicates(inplace=True)
df.to_csv('final.csv', index=False)