frames = []
for table in html('table'):
    data = [[x.text.strip() for x in row] for row in table.getchildren()]
df = pd.DataFrame(data[1:], columns=data[0])
frames.append(df)
return frames
How to convert Wikipedia wikitable to Python Pandas DataFrame?