If you’re trying to do this in ipython notebook, you can do:
from IPython.display import display, HTML
def pretty_print(df):
return display( HTML( df.to_html().replace("\\n","<br>") ) )
If you’re trying to do this in ipython notebook, you can do:
from IPython.display import display, HTML
def pretty_print(df):
return display( HTML( df.to_html().replace("\\n","<br>") ) )