i have this code as input ( i will do this many times for multiple dataframe, so my code is in loop )
v="S"
df_a = pd.DataFrame({ 'Type1': ['A'],'Type2': ['B'],'Type3': ['C'],'Type4': ['D']})
df_a
Output :
Type1 Type2 Type3 Type4
0 A B C D
and i need this
Output :
V Col Val
0 S Type1 A
1 S Type2 B
2 S Type3 C
3 S Type4 D
Thank you