0

I have 2 dataframes with only 1 column. How can I only find a difference between these 2?

df_1 = [ a,b,c,e,g,t,u]
df_2 = [c,e,f,a,b,r]

The result should be like this

df_result = [g,t,u,f,r]
Code Pope
  • 5,075
  • 8
  • 26
  • 68
  • How are this two variables dataframes? Do they contain strings? Are they numpy arrays? – Code Pope May 28 '20 at 16:51
  • 1
    df_result = pd.concat([df_1,df_2]).drop_duplicates(keep=False) https://stackoverflow.com/questions/48647534/python-pandas-find-difference-between-two-data-frames – David Erickson May 28 '20 at 16:51

0 Answers0