[Tutor] handling of tabular data

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Sun Oct 9 06:24:18 CEST 2005



On Sat, 8 Oct 2005, [ISO-8859-1] Frank Hoffsümmer wrote:

> 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.

Hi Frank,

This doesn't quite answer your question in favor of Python, but have you
already considered using something like a relational database?  It
provides support for doing those kind of operations on tabular data.

I'm not certain that applying an OOP approach on table-centric data will
be too effective for solving the kinds of problems you're doing.
However, I have seen that relational databases support operations like
extracting min, max, and average information with relative ease.


Best of wishes to you!



More information about the Tutor mailing list