[SciPy-user] Save column & row headers to csv file withsomething like savetxt?

Alan G Isaac aisaac@american....
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.)

	Sample use::

		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 mailing list