I have output from a dataframe like
0 0.010168 7191516 branch-instructions
1 0.010168 33047525 instructions
2 0.010168 290566 cache-references
3 0.010168 104974 cache-misses
4 0.010168 25109349 cpu-cycles
... ... ... ...
1913 3.376448 2524814 instructions
1914 3.376448 32524 cache-references
1915 3.376448 18957 cache-misses
1916 3.376448 2144874 cpu-cycles
1917 3.376448 3349 branch-misses
I need to write it into csv with the third column as header and the values corresponding to it like
time branch-instructions instructions cache-references cache-misses cpu-cycles branch-misses
0.010168 7191516 33047525 290566 104974 25109349 2458
How can I do this? Any help is appreciated