[SciPy-User] Timseries ts.tofile() Remove brackets.

Dharhas Pothina Dharhas.Pothina at twdb.state.tx.us
Thu Jan 14 10:26:22 EST 2010


Hi,

I'm trying to format the output of ts.tofile() and I can't find anyway to suppress the use of open and close brackets on each line. ie using 

tseries.tofile(cleanfile,format='%Y,%m,%d,%H,%M,%S',separator=',')

saves as :

1996,06,11,21,00,00,('JOB_20090812_CXT_MW9999.csv', 0, 13.199999999999999, 28.949999999999999)
1996,06,11,22,00,00,('JOB_20090812_CXT_MW9999.csv', 0, 13.199999999999999, 28.690000000000001)
...
etc

While what I want is:

1996,06,11,21,00,00,'JOB_20090812_CXT_MW9999.csv', 0, 13.199999999999999, 28.949999999999999
1996,06,11,22,00,00,'JOB_20090812_CXT_MW9999.csv', 0, 13.199999999999999, 28.690000000000001
...
etc

anyway of doing this without reopening the file and removing the brackets.

thanks

- dharhas




More information about the SciPy-User mailing list