%pylab inline
import matplotlib.pyplot as plt
Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.kernel.zmq.pylab.backend_inline]. For more information, type 'help(pylab)'.
import pandas as pd
df = pd.DataFrame.from_items([('A', [1, 2, 3]), ('B', [4, 5, 6])])
class side_by_side():
def __init__(self, *frames):
self.frames = frames
def _repr_html_(self):
width = 100. / len(self.frames)
s = ""
for f in self.frames:
s += "<div style='float: left;'>%s</div>" % f._repr_html_()
return s
side_by_side(df, df)
A | B | |
---|---|---|
0 | 1 | 4 |
1 | 2 | 5 |
2 | 3 | 6 |
A | B | |
---|---|---|
0 | 1 | 4 |
1 | 2 | 5 |
2 | 3 | 6 |