Is there a way to iterate across a dataframe where if a column name is equal to another column's value to input a '1' into that specific cell.
For example:
[A]  [B]  [C]  
D
E
B
C
would translate to:
[A] [B] [C]
D
E
B   1   
C       1
The null values in B and c would simply be NaN.
 
    