[okfn-labs] Python Iterator over table (csv) *columns*

Tarek Amr tarekamr at gmail.com
Wed Dec 17 08:45:31 UTC 2014


I do not think this is possible, there is no way to tell beforehand the
indices for each new line without reading the whole file in memory to
search for '\n's, also cells in the case of CSV are not of a fixed size, so
no way build indices for cells without reading the whole line in memory
looking for separators.

Nevertheless, may be there is some magical solution out there that I don't
know.


On Wed, Dec 17, 2014 at 8:23 AM, Paul Walsh <paulywalsh at gmail.com> wrote:
>
> Hi,
>
> Does anyone have or know of a nice (existing) solution for iterative
> reading of CSV/table data by *column*? It needs to be an iterator - I don’t
> want everything in memory.
> _______________________________________________
> okfn-labs mailing list
> okfn-labs at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/okfn-labs
> Unsubscribe: https://lists.okfn.org/mailman/options/okfn-labs
>


-- 
Best Regards
Tarek Amr

http://tarekamr.appspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20141217/d162b843/attachment-0004.html>


More information about the okfn-labs mailing list