[SciPy-User] [Numpy-discussion] reading in files with fixed with format

Miguel de Val-Borro miguel.deval at gmail.com
Thu Jul 7 04:51:40 EDT 2011


The function numpy.genfromtxt reads text files into arrays. There is an
example on how to deal with fixed-width columns using the delimiter
argument in the docstring and in the I/O chapter of the user guide:
http://docs.scipy.org/doc/numpy/user/basics.io.genfromtxt.html#the-delimiter-argument

Miguel

On Thu, Jul 07, 2011 at 09:51:28AM +0200, Wolfgang Kerzendorf wrote:
> Dear all,
> 
> I have a couple of data files that were written with fortran at a fixed 
> with. That means its tabular data which might not have spaces (it is 
> just specified how many characters each field has and what type it is). 
> Is there anything to read that with scipy and or numpy?
> 
> Cheers
>      Wolfgang
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the SciPy-User mailing list