I have three data frame. here is my code and i am getting value error. raise ValueError("Can only compare identically-labeled Series objects") ValueError: Can only compare identically-labeled Series objects. here is my code. df1 df2 df3 for i in df1: # for i from df1 x = df2.loc[df2['col_1'] == i, 'col_2'] #looking for i in col_1 of df2 and getting coresponding value of col_2 as x. y = df3.loc[df3['col_1'] == x, 'col_2'] #looking for x in col_1 of df3 and getting coresponding value of col_2 as y The first statement in for loop runs correctly but getting value error in second statement.