from IPython.core.display import display_html, HTML def to_html_table(res, style=None): html = '' html += ''.join(res.keys) + '' html += ''.join([''.join([str(cell) for cell in row]) for row in list(res)]) return html + '' def side_by_side(l, r): s = "display: inline-block;" html = to_html_table(l, style=s) + ' ' + to_html_table(r, style=s) display_html(HTML(data=html))