Hi Guys,
I have a dataframe (df1
) with more than 1000 columns, I would like to compare the two successive columns starting from the first column (1GT) and check if the contents match. For example, I want to compare column 1GT
with column 1XGT
and and get the concordance column in result with match or mismatch decision. Thank you.
df1
:
1GT 1XGT 2GT 2XGT
0/0 0/1 zero zero
0/1 0/1 one zero
Result:
1GT 1XGT concordance 2GT 2XGT concordance
0/0 0/1 mismatch zero zero match
0/1 0/1 match one zero mismatch
Thank you, what if I have thousands of columns and want to match two columns at a time across the table?