bfdi533 has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using PDL->transpose on CSV file
by zentara (Cardinal) on Feb 08, 2006 at 16:51 UTC | |
by bfdi533 (Friar) on Feb 08, 2006 at 21:13 UTC | |
|
Re: using PDL->transpose on CSV file
by zentara (Cardinal) on Feb 08, 2006 at 17:33 UTC | |
by bfdi533 (Friar) on Feb 08, 2006 at 21:10 UTC | |
|
Re: using PDL->transpose on CSV file
by NiJo (Friar) on Feb 08, 2006 at 20:26 UTC |