I have a dataframe and columns in that dataframe could be any number(2-50). for example it is 2 columns as below. I want to remove rows where site1 and site2 are same.
df = pd.DataFrame([[507814, 501972], [529389, 529389], [508110, 508161]], columns = ['site1', 'site2'])
I want to drop rows with similar column values as below Expected Output:
df[df["site1"] != df["site2"]]
This can be done this this line, but as I do not have fix number of column and this piece is inside of loop i need a fastest way to do this
I appreciate the help in advance.
Thanks.

