import numpy as np import pandas as pd from IPython.display import display_html df1 = pd.DataFrame(np.arange(12).reshape((3,4)),columns=['A','B','C','D',]) df2 = pd.DataFrame(np.arange(16).reshape((4,4)),columns=['A','B','C','D',]) df1_styler = df1.style.set_table_attributes("style='display:inline'").set_caption('Caption table 1') df2_styler = df2.style.set_table_attributes("style='display:inline'").set_caption('Caption table 2') display_html(df1_styler._repr_html_()+df2_styler._repr_html_(), raw=True)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter