Skip to content

Instantly share code, notes, and snippets.

@alejio
Created March 21, 2018 14:15
Show Gist options
  • Save alejio/af389cd9f533a5e9f84ee5cd169050d0 to your computer and use it in GitHub Desktop.
Save alejio/af389cd9f533a5e9f84ee5cd169050d0 to your computer and use it in GitHub Desktop.
Display pandas dataframes side-by-side
from IPython.display import display_html
def display_side_by_side(*args):
html_str=''
for df in args:
html_str+=df.to_html()
display_html(html_str.replace('table','table style="display:inline"'),raw=True)
#https://stackoverflow.com/questions/38783027/jupyter-notebook-display-two-pandas-tables-side-by-side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment