I guess using the slice operator on the table should probably also load the entire table into memory:
a = f.root.path.to.table[:] This will return a structured array tough. On Mon, Feb 20, 2012 at 5:43 PM, Anthony Scopatz <scop...@gmail.com> wrote: > Hello German, > > The easiest and probably the fastest way is to use numpy array. > Simply pass the table into the array constructor: > > import numpy as np > a = np.array(f.root.path.to.table) > > If your table contains more than one type and you want to keep that > setup via a structured array, also pass in the dtype: > > a = np.array(f.root.path.to.table, f.root.path.to.table.dtype) > > Be Well > Anthony > > > On Mon, Feb 20, 2012 at 4:57 AM, German Ocampo <geroca...@gmail.com> wrote: >> >> Good morning >> >> Im new in Pytables and I have a simple question, please help me. >> >> I have a pytable created with four Float() columns, the number of rows >> in the table is around 500.000. I need to read all the complete table >> in fastest way possible to a numpy array in memory. Im using the >> following command: >> >> total =[ (x['col1'],x['col2'],x['col3'],x['col4'],) for x in >> row_relational] >> >> Question: Is there another command that allows to read in a fastest way? >> >> Many thanks >> >> German >> >> >> ------------------------------------------------------------------------------ >> Try before you buy = See our experts in action! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-dev2 >> _______________________________________________ >> Pytables-users mailing list >> Pytables-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/pytables-users > > > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > _______________________________________________ > Pytables-users mailing list > Pytables-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pytables-users > ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users