title: How to extract table data from html file with BeautifulSoup?
body: <p>I am trying to clean up some data I have to prep it for moving it into a database. I am not a programmer by trade, so this is all new to me. I have been scouring the site trying to find sample code to try. I found this discussion and as you can see, I tried to adapt my situation to it:
  <a href="https://stackoverflow.com/questions/23809640/how-to-extract-html-table-by-using-beautifulsoup">How to extract html table by using Beautifulsoup</a></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;This the title.&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;center&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;h2&gt;Test Case 1&lt;/h2&gt;
  &lt;/center&gt;
  &lt;table align="center" border="1" cellpadding="0" cellspacing="1" width="650"&gt;
  &lt;tr&gt;
  &lt;td&gt;
  &lt;font size="1"&gt; Cell Title 1&lt;/font&gt;
  &lt;br /&gt; &lt;/td&gt;
  &lt;td&gt;
  &lt;font size="1"&gt; Cell Title 2&lt;/font&gt;
  &lt;br /&gt; &lt;/td&gt;
  &lt;td&gt;
  &lt;font size="1"&gt; Cell Title 3&lt;/font&gt;
  &lt;br /&gt; 
  &lt;font size="2"&gt;Value&lt;/font&gt;&lt;/td&gt;
  &lt;td&gt;
  &lt;font size="1"&gt; Cell Title4&lt;/font&gt;
  &lt;br /&gt; 
  &lt;font size="2"&gt;Value&lt;/font&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Traceback (most recent call last): File "ExtractTest2.py", line 35, in
     print soup.find("td", {"size":"2"}).find_parent('table')
    AttributeError: 'NoneType' object has no attribute 'find_parent'</p>
  </blockquote>
  
  <p>My ultimate goal is to print out</p>
  
  <pre><code>Cell Title X : Value
  </code></pre>
  
  <p>if there is a Value as there will be a Cell Title. </p>
  
  <p>Where did I go wrong? </p>