How to scrape a table from a webpage? I need to scrape a table off of a webpage and put it into a pandas data frame. But I am not being able to do it. Let me first give you a hint of how the table is encoded into html document. 

&lt;tbody&gt;
&lt;tr&gt;
&lt;th colspan="2"&gt;United States Total&lt;strong&gt;**&lt;/strong&gt;&lt;/th&gt;
&lt;td&gt;&lt;strong&gt;15,069.0&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;14,575.0&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.0&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th colspan="7"&gt;Arizona&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pinal Energy, LLC&lt;/td&gt;
&lt;td&gt;Maricopa, AZ&lt;/td&gt;
&lt;td&gt;50.0&lt;/td&gt;
&lt;td&gt;50.0&lt;/td&gt;
&lt;td&gt;NA&lt;/td&gt;
&lt;td&gt;2012-07-01&lt;/td&gt;
&lt;td&gt;2014-03&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2"&gt;&lt;strong&gt;Arizona Total&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;50.0&lt;/td&gt;
&lt;td&gt;50.0&lt;/td&gt;
&lt;td&gt;NA&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;


The body of the table begins with &lt;tbody&gt;....&lt;/tbody&gt;. Each &lt;tr&gt;....&lt;/tr&gt; is a row of the table.Within each row, that is within each pair of &lt;tr&gt;....&lt;/tr&gt;, each column is given by &lt;td&gt;50.0&lt;/td&gt;. 

Here are my questions: 

1) How do I scrape it ? I am using BeautifulSoup and requests for this purpose as well as pandas module. I tried the following:

r = requests.get(url)
bs = BeautifulSoup(r.text)
info = bs.findALL('tr','td')
  ....
  ....


But it is giving me this error: 

TypeError                                 Traceback (most recent call last)
&lt;ipython-input-24-32d9483e2c59&gt; in &lt;module&gt;()
      1 bs = BeautifulSoup(r.text)
----&gt; 2 info = bs.findALL('tr','td')
      3 #print bs

TypeError: 'NoneType' object is not callable


2) I need to skip some of the rows based on the text in it. For example I don't want to read in the row in which the word 'Total' appears (as in&lt;th colspan="2"&gt;United States Total&lt;strong&gt;**&lt;/strong&gt;&lt;/th&gt;). How do I do that ? Although, it is not extremely important as I can get rid off it later, but skipping these rows while reading the data is ideally what I need.

I know it is a long post, but if someone can help me with it, i would greatly appreciate it. Please let me know if more information is needed. 

Thanks much.
This will give you all the  values under &lt;tr&gt;:

bs=BeautifulSoup(data, "lxml")
table_body=bs.find('tbody')
rows = table_body.find_all('tr')
for row in rows:
    cols=row.find_all('td')
    cols=[x.text.strip() for x in cols]
    print cols