I have a some csv data which I want to reformat as
I want to change this format with Data1-4 as column names and Value 1-4 as values besides data A and B
I have millions of rows, where I don't want to loop it. I am working with python data frame.
Please suggest the best way to do this as looping for millions loop will take huge time and I want to complete the task in the best possible way in terms of performance.
Some more sample data which I am trying to do:


