I have a dataframe like below:
Column1 Column2 Column3 Column4
1 12 5 6
I want to create a dictionary with the column_name as keys i.e. Column1, Column2, Column3, Column4 and values as 1,2,3,4 (incremental values)
Post that, i want to transform my dataframe to below:
1 2 3 4
1 12 5 6
i.e. Column1 replaced by 1, Column2 replaced by 2 and so on......
Can someone help me out?