<div dir="ltr">FWIW, when I needed a fast Fixed Width reader for a very large dataset last year, I found that np.genfromtext() was faster than pandas' read_fwf(). IIRC, pandas' text reading code fell back to pure python for fixed width scenarios.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 8:22 PM, Chris Barker - NOAA Federal <span dir="ltr"><<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>Grabbing the pandas csv reader would be great, and I hope it happens sooner than later, though alas, I haven't the spare cycles for it either.</div><div><br></div><div>In the meantime though, can we put a deprecation Warning in when using fromstring() on text files? It's really pretty broken.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Chris </div></font></span><div><div class="h5"><div><br>On Oct 23, 2015, at 4:02 PM, Jeff Reback <<a href="mailto:jeffreback@gmail.com" target="_blank">jeffreback@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div><br></div><div><br>On Oct 23, 2015, at 6:49 PM, Nathaniel Smith <<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>> wrote:<br><br></div><blockquote type="cite"><div><p dir="ltr">On Oct 23, 2015 3:30 PM, "Jeff Reback" <<a href="mailto:jeffreback@gmail.com" target="_blank">jeffreback@gmail.com</a>> wrote:<br>
><br>
> On Oct 23, 2015, at 6:13 PM, Charles R Harris <<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>> wrote:<br>
><br>
>><br>
>><br>
>> On Thu, Oct 22, 2015 at 5:47 PM, Chris Barker - NOAA Federal <<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>> wrote:<br>
>>><br>
>>><br>
>>>> I think it would be good to keep the usage to read binary data at least.<br>
>>><br>
>>><br>
>>> Agreed -- it's only the text file reading I'm proposing to deprecate. It was kind of weird to cram it in there in the first place.<br>
>>><br>
>>> Oh, fromfile() has the same issues.<br>
>>><br>
>>> Chris<br>
>>><br>
>>><br>
>>>> Or is there a good alternative to `np.fromstring(<bytes>, dtype=...)`? -- Marten<br>
>>>><br>
>>>> On Thu, Oct 22, 2015 at 1:03 PM, Chris Barker <<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>> wrote:<br>
>>>>><br>
>>>>> There was just a question about a bug/issue with scipy.fromstring (which is numpy.fromstring) when used to read integers from a text file.<br>
>>>>><br>
>>>>> <a href="https://mail.scipy.org/pipermail/scipy-user/2015-October/036746.html" target="_blank">https://mail.scipy.org/pipermail/scipy-user/2015-October/036746.html</a><br>
>>>>><br>
>>>>> fromstring() is bugging and inflexible for reading text files -- and it is a very, very ugly mess of code. I dug into it a while back, and gave up -- just to much of a mess!<br>
>>>>><br>
>>>>> So we really should completely re-implement it, or deprecate it. I doubt anyone is going to do a big refactor, so that means deprecating it.<br>
>>>>><br>
>>>>> Also -- if we do want a fast read numbers from text files function (which would be nice, actually), it really should get a new name anyway.<br>
>>>>><br>
>>>>> (and the hopefully coming new dtype system would make it easier to write cleanly)<br>
>>>>><br>
>>>>> I'm not sure what deprecating something means, though -- have it raise a deprecation warning in the next version?<br>
>>>>><br>
>><br>
>> There was discussion at SciPy 2015 of separating out the text reading abilities of Pandas so that numpy could include it. We should contact Jeff Rebeck and see about moving that forward.<br>
><br>
><br>
> IIRC Thomas Caswell was interested in doing this :)</p>
<p dir="ltr">When he was in Berkeley a few weeks ago he assured me that every night since SciPy he has dutifully been feeling guilty about not having done it yet. I think this week his paltry excuse is that he's "on his honeymoon" or something.</p>
<p dir="ltr">...which is to say that if someone has some spare cycles to take this over then I think that might be a nice wedding present for him :-).</p>
<p dir="ltr">(The basic idea is to take the text reading backend behind pandas.read_csv and extract it into a standalone package that pandas could depend on, and that could also be used by other packages like numpy (among others -- I thing dato's SFrame package has a fork of this code as well?))</p>
<p dir="ltr">-n</p>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>NumPy-Discussion mailing list</span><br><span><a href="mailto:NumPy-Discussion@scipy.org" target="_blank">NumPy-Discussion@scipy.org</a></span><br><span><a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a></span><br></div></blockquote><br><div>I can certainly provide guidance on how/what to extract but don't have spare cycles myself for this :(</div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>NumPy-Discussion mailing list</span><br><span><a href="mailto:NumPy-Discussion@scipy.org" target="_blank">NumPy-Discussion@scipy.org</a></span><br><span><a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a></span><br></div></blockquote></div></div></div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div>