Created
March 21, 2018 14:15
-
-
Save alejio/af389cd9f533a5e9f84ee5cd169050d0 to your computer and use it in GitHub Desktop.
Display pandas dataframes side-by-side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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