[Tutor] handling of tabular data

Pujo Aji ajikoe at gmail.com
Sun Oct 9 11:16:18 CEST 2005


Hi Frank,
 you can use Numeric.py it is also powerfull to handle averages, min, max,
matrix algebra, etc..
see: http://www.pfdubois.com/numpy/
 You just need to use a list.
 If your data is big and you need more power I suggest you use database like
mysqldb for python.
It is also fun to combine database and python all together.
 Cheers,
pujo

 On 10/8/05, Frank Hoffsümmer <frank.hoffsummer at gmx.de> wrote:
>
> Hello
> I often find myself writing python programs to compute averages, min,
> max, top10 etc of columns in a table of data
> In these programs, I always capture each row of the table in a tuple
> the table is then represented by a list of tuples
> computing averages, min, max and other meta-information is then done
> with for loops or some list comprehension.
>
> now I wonder, whether I shouldn't be using classes instead of lists
> to capture the table rows
> with the little I know about classes, I assume that then I would have
> a list of class instances as representation of my tabular data
> but given such a list of class instances, i would still need for
> loops to get to e.g. the minimal value of a certain attribute in all
> classes in that list. OR?
> and what would be the benefit of using classes then?
>
> what is the best practice, can anyone shed some light on this
> thanks
> -frank
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051009/f2330875/attachment.html


More information about the Tutor mailing list