title: What should I do when <tr> has rowspan
body: <p>If the row has rowspan element , how to make the row correspond to the table as in wikipedia page.     </p>
  
  <pre><code>from bs4 import BeautifulSoup
  import urllib2
  from lxml.html import fromstring 
  import re
  import csv
  import pandas as pd
  
  wiki = "http://en.wikipedia.org/wiki/List_of_England_Test_cricket_records"
  header = {'User-Agent': 'Mozilla/5.0'} #Needed to prevent 403 error on Wikipedia
  req = urllib2.Request(wiki,headers=header)
  page = urllib2.urlopen(req)
  soup = BeautifulSoup(page)
  
  try:
      table = soup.find_all('table')[6]
  except AttributeError as e:
      print 'No tables found, exiting'
  
  try:
      first = table.find_all('tr')[0]
  except AttributeError as e:
      print 'No table row found, exiting'
  
  try:
      allRows = table.find_all('tr')[1:-1]
  except AttributeError as e:
      print 'No table row found, exiting'
  
  
  headers = [header.get_text() for header in first.find_all(['th', 'td'])]
  results = [[data.get_text() for data in row.find_all(['th', 'td'])] for row in allRows]
  
  
  df = pd.DataFrame(data=results, columns=headers)
  df
  </code></pre>
  
  <hr>
  
  <p>I get the table as the output.. but for tables where the row contains <em>rowspan -</em> i get table as follows - 
  <img src="https://i.stack.imgur.com/M5xmK.png" alt="enter image description here"></p>