Re: What iterable method should I use for Lists of Lists

2016-04-18 Thread Peter Otten
Sayth Renshaw wrote: > Think I have a solution of sorts, although my numpy array failed, zip > worked. > > from pyquery import PyQuery as pq > import numpy as np > > d = pq(filename='20160319RHIL0_edit.xml') > res = d('nomination') > # myAt = pq.each(res.attr('bbid')) > # print(repr(res)) > # my

Re: What iterable method should I use for Lists of Lists

2016-04-18 Thread Sayth Renshaw
> > You're getting very chatty with yourself, which is fine... but do you > need to quote your entire previous message every time? We really don't > need another copy of your XML file in every post. > > Thanks! > > ChrisA Oops sorry, everytime I posted I then thought of another resource and ke

Re: What iterable method should I use for Lists of Lists

2016-04-17 Thread Chris Angelico
On Mon, Apr 18, 2016 at 2:09 PM, Sayth Renshaw wrote: >> > > > > > id="187674" idnumber="" regnumber="" blinkers="0" trainernumber="736" >> > > trainersurname="Martin" trainerfirstname="Tim" trainertrack="Rosehill" >> > > rsbtrainername="Tim Martin" jockeynumber="46930" jockeysurname="Anglan

Re: What iterable method should I use for Lists of Lists

2016-04-17 Thread Sayth Renshaw
On Monday, 18 April 2016 13:13:21 UTC+10, Sayth Renshaw wrote: > On Monday, 18 April 2016 12:12:59 UTC+10, Sayth Renshaw wrote: > > On Monday, 18 April 2016 12:05:39 UTC+10, Sayth Renshaw wrote: > > > Hi > > > > > > I have an XML and using pyquery to obtain the elements within it and then > >

Re: What iterable method should I use for Lists of Lists

2016-04-17 Thread Sayth Renshaw
On Monday, 18 April 2016 12:12:59 UTC+10, Sayth Renshaw wrote: > On Monday, 18 April 2016 12:05:39 UTC+10, Sayth Renshaw wrote: > > Hi > > > > I have an XML and using pyquery to obtain the elements within it and then > > write it to csv. > > > > What is the best most reliable way to take dicti

Re: What iterable method should I use for Lists of Lists

2016-04-17 Thread Sayth Renshaw
On Monday, 18 April 2016 12:05:39 UTC+10, Sayth Renshaw wrote: > Hi > > I have an XML and using pyquery to obtain the elements within it and then > write it to csv. > > What is the best most reliable way to take dictionaries of each element, and > print them(csv write later) based on each posi

What iterable method should I use for Lists of Lists

2016-04-17 Thread Sayth Renshaw
Hi I have an XML and using pyquery to obtain the elements within it and then write it to csv. What is the best most reliable way to take dictionaries of each element, and print them(csv write later) based on each position so get item 0 of each list and then it 1 and so on. Any other code I po