Ex:
A B C D
0 2 2 3
2 4 5 6
2 4 6 8
Here, the index of column "C" is 2. I want to store this index in the variable by converting that column name into variable.
So, C=2
Note this should work in dynamic case.
Tried:
exec("%s = %s" % "a","b")
But this is not working in a function.
The name of the column is unknown, need the index of the column stored in the same column name.