[SciPy-user] Save column & row headers to csv file withsomething like savetxt?
Alan G Isaac
Fri Dec 19 14:07:56 CST 2008
On 12/19/2008 2:46 PM Dharhas Pothina apparently wrote:
> I'm going to try scikits.timeseries.lib.reportlib that Pierre suggested first since I already have scikits.timeseries installed.
Sounds good. Please post your experience.
Just fyi, text.py is self contained.
(No need to "install"; just put the file in your working directory.)
mydata = [[11,12],[21,22]]
myhdrs = "Column 1", "Column 2"
mystubs = "Row 1", "Row 2"
tbl = SimpleTable(mydata, myhdrs, mystubs)
print( tbl.as_csv() )
tbl = SimpleTable(mydata, myhdrs, mystubs, title="Title")
print( tbl.as_text() )
print( tbl.as_latex_tabular() )
More information about the SciPy-user