StringIO(data_file_name) will not read your file, it will just allow you to read the string data_file_name. You can probably just use open(data_file_name) (and yes,you'll probably need to open it for each call to genfromtxt).<br>
Sorry my script didn't work, I definitely didn't expect it to work right away, it was more to give you an idea of the kind of stuff you could do manually. I'd expect it should be pretty straightforward to fix it. I personally find it easier to write my own custom code to load such small data files, rather than try to find the right parameters for an existing function ;) (especially with mixed float / string dta).<br>
<br>-=- Olivier<br><br><div class="gmail_quote">2011/5/19 Aradenatorix Veckhom Vacelaevus <span dir="ltr"><<a href="mailto:aradnix@gmail.com">aradnix@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks both for your helping:<div><br></div><div>I was checking the script fro Olivier but doesn't works yet, later I tried with the asciitable package but I also never could read any of my files (finally I decide create a single file for each case, it means to get 2 arrays for each domain).</div>

<div><br></div><div>I was reading a while about how to import data with genfromtxt in Numpy, it was very interesting because I have a lot of options for import data, I can skip headers and footers, I can import selected columns and other stuff, so I wanna use it for import my columns in each case and later get an output in a text file, how can I get it?</div>

<div><br></div><div>My idea is to make something like:</div><div><br></div><div><div>#!/usr/bin/env python</div><div>#-*- coding:utf-8 -*-</div><div><br></div><div>import numpy as np</div><div>from StringIO import StringIO</div>

<div><br></div><div>np.genfromtxt(StringIO(data_file_name), autostrip=True, skip_header=2, usecols=(1, 2, 3))</div></div><div><br></div><div>np.genfromtxt(StringIO(data_file_name), autostrip=True, skip_header=2, usecols=(4, 5, 6))<br>

<br></div><div>np.genfromtxt(StringIO(data_file_name), autostrip=True, skip_header=2, usecols=(-1))</div>
<div><br></div><div>But I'm not sure how to use it, I have not experience importing that stuff, but also I don't know If I need to add a line at the beginning with </div><div><br></div><div>data = StringIO(data_file_name)</div>

<div><br></div><div>Could you help me once more?</div><div><br></div><div>Regards:</div><div>Aradnix</div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br>