I finally got around to playing a tiny bit with pandas today and was delighted when I saw its representation in the IPython notebook. Take a look in the PDF.
IPython detects a special
_repr_html_ method on (in this case) the pandas DataFrame object and uses that for the output instead of the usual
__repr__ methods. Here
_repr_html_ returns the contents of the DataFrame in an HTML table, which is also useful for posting to a blog:
This is another great feature of the IPython notebook and I look forward to it popping up in more places!
One thought on “pandas in the IPython Notebook”
[…] IPython Notebook makes it possible to display rich representations of Python objects using HTML (among other things). That allowed me to make a Python object whose representation in […]