python - Pandas dataframe rendering as table in Jupyter -
if have pandas.dataframe
df
, doing
df
in empty jupyter notebook cell render nicely table.
having class wrapping around dataframe, how can render underlying dataframe in same way?
class wrapper: def __init__(self, df): self._df = df def __repr__(self): ## to_html not work return self._df.to_html()
this gives idea, to_html
not seem able trick. do?
Comments
Post a Comment