Re: Data aggregation

2008-03-06 Thread petr . jakes . tpc
On Mar 6, 7:44 pm, John Nagle <[EMAIL PROTECTED]> wrote: > vedranp wrote: > > I would like to avoid the step of taking data out from database in > > order to process it. > > You can probably do this entirely within SQL. Most SQL databases, > including MySQL, will let you put the result of a SE

Re: Data aggregation

2008-03-06 Thread John Nagle
vedranp wrote: > I would like to avoid the step of taking data out from database in > order to process it. You can probably do this entirely within SQL. Most SQL databases, including MySQL, will let you put the result of a SELECT into a new table. John Nagle

Re: Data aggregation

2008-03-06 Thread jay graves
On Mar 6, 10:28 am, vedranp <[EMAIL PROTECTED]> wrote: > So, group by DATE, COUNTRY, ZIP and CITY and sum (or do some You are s close. Look up itertools.groupby Don't forget to sort your data first. http://aspn.activestate.com/ASPN/search?query=groupby&x=0&y=0§ion=PYTHONCKBK&type=Subsection

Data aggregation

2008-03-06 Thread vedranp
Hi, I have a case where I should aggregate data from the CSV file, which contains data in this way: DATETIMECOUNTRY ZIP CITYVALUE1 VALUE2 VALUE3 21.2.2008 00:00 A 1000CITY1 1 2 3 21.2.2008 00:00 A 1000CITY2 4 5 6 21