title: HTML table to pandas table: Info inside html tags
body: <p>I have a large table from the web, accessed via requests and parsed with BeautifulSoup.  Part of it looks something like this:</p>
  
  <pre><code>&lt;table&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;265&lt;/td&gt;
  &lt;td&gt; &lt;a href="/j/jones03.shtml"&gt;Jones&lt;/a&gt;Blue&lt;/td&gt;
  &lt;td&gt;29&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr &gt;
  &lt;td&gt;266&lt;/td&gt;
  &lt;td&gt; &lt;a href="/s/smith01.shtml"&gt;Smith&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;34&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>When I convert this to pandas using <code>pd.read_html(tbl)</code> the output is like this:</p>
  
  <pre><code>    0    1          2
   0  265  JonesBlue  29
   1  266  Smith      34
  </code></pre>
  
  <p>I need to keep the information in the <code>&lt;A HREF ... &gt;</code> tag, since the unique identifier is stored in the link.  That is, the table should look like this:</p>
  
  <pre><code>    0    1        2
   0  265  jones03  29
   1  266  smith01  34
  </code></pre>
  
  <p>I'm fine with various other outputs (for example, <code>jones03 Jones</code> would be even more helpful) but the unique ID is critical.  </p>
  
  <p>Other cells also have html tags in them, and in general I don't want those to be saved, but if that's the only way of getting the uid I'm OK with keeping those  tags and cleaning them up later, if I have to.</p>
  
  <p>Is there a simple way of accessing this information?</p>