Skip to content

Commit 4103ce9

Browse files
committed
Add _repr_html method to make DataFrames nice in IPython notebook.
1 parent 13f5db0 commit 4103ce9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/frame.py

+3
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,9 @@ def __repr__(self):
462462
return com.console_encode(value)
463463
return com.console_encode(buf.getvalue())
464464

465+
def _repr_html_(self):
466+
return self.to_html()
467+
465468
def __iter__(self):
466469
"""
467470
Iterate over columns of the frame.

0 commit comments

Comments
 (0)