I have the file called mda_bk-adds-gro.inp
:
# -*- mode:python -*-
0.5, 0.5, 0.5, walp_fixed.gro
0.5, 0.5, 0.4, walp.gro
I think I'll read the numbers and the the word separately. I've succeded in parsing the numbers:
loadtxt('mda_bk-adds-gro.inp', comments='#', delimiter=',', usecols=(0,1,2))
But can't read in just words:
loadtxt('mda_bk-adds-gro.inp', comments='#', delimiter=',', dtype=[('fileName', '|S100')], usecols=(3))
it gives an error:
TypeError: 'int' object is not iterable
So my question is - how do I read the forth column with loadtxt
provided the column is str
?