title: How to identify blank `td` seperating each column in a table
body: <p>I am scraping data from <a href="https://www.sec.gov/Archives/edgar/data/1097718/000135448815004617/uoip_10k.htm" rel="nofollow noreferrer">sec uoip_10k</a>, <strong><em>Consolidated Balance Sheets</em></strong> table. Each column is separated by 1 or two<code>td</code> with blank data. Is there a way to identify those blanks <code>td</code>s. </p>
  
  <p>currently , what i am doing is a below.</p>
  
  <pre><code>def check_if_cell_seperator(cell):
      if 'width' in str(cell):
          width = int(cell["width"].strip('%').strip())
          if width &lt; 2 and cell.text.strip() == '':
              return True
          else:
              return False
      else:
          return False
  
  def main(url):
      htmlpage = urllib.request.urlopen(url)
      page = BeautifulSoup(htmlpage, "html.parser")
      all_divtables = page.find_all('table')
      # only taking data from 38th table
      for i,table in enumerate(all_divtables[38:39]):
          rows = table.find_all(['th', 'td'],recursive=False)
          table_data = []
          for tr in rows:
              row_data=[]
              cells = tr.find_all('td')
              for cell in cells:
                  if check_if_cell_seperator(cell):
                      continue
                  else:
                      cell_data = cell.text
                  row_data.append(cell_data.encode('utf-8'))    
          table_data.append([x.decode('utf-8').strip() for x in row_data]) 
      print(table_data)      
  </code></pre>
  
  <p>But the issue here is scraping data from rows where cell <code>width</code> is not specified (e.g.: heading rows).  </p>
  
  <p>Is there any way i can identify and delete <code>td</code> which are there only to separate columns.  </p>
  
  <blockquote>
    <p>cannot delete  all the blanks from my final list as it will affect indentation.   </p>
    
    <p><strong>Example</strong></p>
  </blockquote>
  
  <pre><code>    &lt;tr&gt;
      &lt;td valign="bottom" style="PADDING-BOTTOM: 2px"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: times new roman; FONT-SIZE: 8pt"&gt;&amp;nbsp; &lt;/font&gt;&lt;/td&gt;
      &lt;td valign="bottom" style="PADDING-BOTTOM: 2px"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: times new roman; FONT-SIZE: 8pt; FONT-WEIGHT: bold"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
      &lt;td colspan="2" valign="bottom" style="BORDER-BOTTOM: black 2px solid"&gt;
          &lt;div style="TEXT-INDENT: 0pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="center"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: times new roman; FONT-SIZE: 8pt; FONT-WEIGHT: bold"&gt;2015&lt;/font&gt;&lt;/div&gt;
      &lt;/td&gt;
      &lt;td nowrap="" valign="bottom" style="TEXT-ALIGN: left; PADDING-BOTTOM: 2px"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: times new roman; FONT-SIZE: 8pt; FONT-WEIGHT: bold"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
      &lt;td valign="bottom" style="PADDING-BOTTOM: 2px"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: times new roman; FONT-SIZE: 8pt; FONT-WEIGHT: bold"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
      &lt;td colspan="2" valign="bottom" style="BORDER-BOTTOM: black 2px solid"&gt;
          &lt;div style="TEXT-INDENT: 0pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="center"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: times new roman; FONT-SIZE: 8pt; FONT-WEIGHT: bold"&gt;2014&lt;/font&gt;&lt;/div&gt;
      &lt;/td&gt;
      &lt;td nowrap="" valign="bottom" style="TEXT-ALIGN: left; PADDING-BOTTOM: 2px"&gt;&lt;font style="DISPLAY: inline; FONT-FAMILY: times new roman; FONT-SIZE: 10pt; FONT-WEIGHT: bold"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
      &lt;/tr&gt; 
  </code></pre>
  
  <p>in the above example <code>td</code>s 2,4,5 are blanks tds only for separating columns.</p>
  
  <p>please help.</p>