title: BeautifulSoup: How to remove empty tables, while preserving tables that are partially empty or not empty
body: <p>I have an old website originally created in MS Frontpage that I'm trying to defrontpagify.  I've written a BeautifulSoup script that does most of it.  Only thing left is to remove empty tables, eg tables with no text content or data in <em>any</em> of their <code>td</code> tags.  </p>
  
  <p>The problem I'm stuck on is that what I've tried so far removes the table if at least one its <code>td</code> tags contains no data, even if others do.  That removes all the tables in the entire document, including ones with data I want to preserve.</p>
  
  <pre><code>tags = soup.findAll('table',text=None,recursive=True) 
  [tag.extract() for tag in tags]
  </code></pre>
  
  <p>Any suggestions how to only remove tables in which <em>none</em> of the td tags contain any data?  (I don't care if they contain <code>img</code> or empty anchor tags, as long as there's no text).</p>