Starting with pandas 0.17.1 visualization of DataFrames can be directly modified using pandas 0.17.1 methods.
To display two DataFrames side by side, you must use set_table_attributes with the argument "style='display:inline'" as suggested in the ntg answer . This will return two Styler objects. To display aligned data frames, simply pass their combined HTML representation through the display_html method from IPython.
Using this method is also easier to add other style options. How to add a signature as required here :
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)

gibbone
source share