TFS writer crashes if column names are not string
Created by: JoschD
For example if they are int (which is the default for pandas). Related to #11 (closed)? (I don't know what #11 (closed) was referencing... please more detailed Issue descriptions).
Code Example :
import tfs
df = tfs.TfsDataFrame([[1,2,3]])
tfs.write("test.tfs", df)
Crashes with:
Traceback (most recent call last):
File "/media/jdilly/Storage/Repositories/omc3/omc3/udillyties/tests/tfs_writer_test.py", line 3, in <module>
tfs.write("test.tfs", df)
File "/media/jdilly/Storage/Repositories/omc3/omc3/tfs/handler.py", line 173, in write_tfs
colnames_str = _get_colnames_str(data_frame.columns, colwidth)
File "/media/jdilly/Storage/Repositories/omc3/omc3/tfs/handler.py", line 202, in _get_colnames_str
return "* " + fmt.format(*colnames)
ValueError: Unknown format code 's' for object of type 'int'