from IPython.display import HTML, display
data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
display(HTML('<table><tr>{}</tr></table>'.format('</tr><tr>'.join(
    '<td>{}</td>'.format('</td><td>'.join(str(_) for _ in row)) for row in
    data))))
How do I output lists as a table in Jupyter notebook?