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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -