I have been looking for a good way to transpose the rows and columns in a CSV file that I am working with. It was shipped to me with the data columns on the left and the data across. This, as you may realize, is impossible to load into a database or work with it with any sort of meaningful data tools.
I have searched the site and the web and cannot find any reference to doing this. There are many ways to swap columns in a CSV file here but no transpose code. There was a reference to PDL and looking into it, the transpose would be very easy.
But, I cannot seem to find any way to load an array into a PDL. I can successfully get the CSV file into an array using Text::CSV::Simple. But, now how would I get this array into a PDL so I can do the transpose?
In reply to using PDL->transpose on CSV file by bfdi533
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |