from bs4 import BeautifulSoup
table_data = [[cell.text for cell in row("td")] for row in BeautifulSoup(html_data)("tr")]
import json
print json.dumps(dict(table_data))
from collections import OrderedDict
import json
print json.dumps(OrderedDict(table_data))