Python/Numpy - Save Array with Column AND Row Titles
- by Scott B
I want to save a 2D array to a CSV file with row and column "header" information (like a table). I know that I could use the header argument to numpy.savetxt to save the column names, but is there any easy way to also include some other array (or list) as the first column of data (like row titles)?
Below is an example of how I currently do it. …