Re: [Numpy-discussion] Importing data from html tables

2007-09-07 Thread Robert Kern
ale wrote: > Hi, > I'm trying to import into array the data contained in a html table. > I use BeautifulSoup as html parser > > html = open('T0015.html','r') > bs = BeautifulSoup(html) > for tr in bs.findAll('tr')[1:]: > table.append([td.p.string for td in tr.findAll('td')]) > > and I get

[Numpy-discussion] Importing data from html tables

2007-09-07 Thread ale
Hi, I'm trying to import into array the data contained in a html table. I use BeautifulSoup as html parser html = open('T0015.html','r') bs = BeautifulSoup(html) for tr in bs.findAll('tr')[1:]: table.append([td.p.string for td in tr.findAll('td')]) and I get this: print table [[u'1925',