diff --git a/doc/source/release.rst b/doc/source/release.rst index b12f4eca010d9..7962416b6d77b 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -499,6 +499,8 @@ Bug Fixes - Bug in ``MultiIndex.get_level_values`` doesn't preserve ``DatetimeIndex`` and ``PeriodIndex`` attributes (:issue:`7092`) - Bug in ``Groupby`` doesn't preserve ``tz`` (:issue:`3950`) - Bug in ``PeriodIndex`` partial string slicing (:issue:`6716`) +- Bug in the HTML repr of a truncated Series or DataFrame not showing the class name with the `large_repr` set to 'info' + (:issue:`7105`) pandas 0.13.1 ------------- diff --git a/doc/source/v0.14.0.txt b/doc/source/v0.14.0.txt index ca8e714bdbef8..f5c4b79070c8d 100644 --- a/doc/source/v0.14.0.txt +++ b/doc/source/v0.14.0.txt @@ -202,6 +202,9 @@ API changes Display Changes ~~~~~~~~~~~~~~~ +- Fixed a bug in the HTML repr of a truncated Series or DataFrame not showing the class name with the + `large_repr` set to 'info' (:issue:`7105`) + .. _whatsnew_0140.groupby: Groupby API Changes diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 773270ba1d593..ec1529b66acd8 100755 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -485,7 +485,10 @@ def _repr_html_(self): if self._info_repr(): buf = StringIO(u("")) self.info(buf=buf) - return '
' + buf.getvalue() + '' + # need to escape the
' + val + '' if get_option("display.notebook_repr_html"): max_rows = get_option("display.max_rows") diff --git a/pandas/tests/test_format.py b/pandas/tests/test_format.py index 3404e4ddb7d44..5ce2102ace5a9 100644 --- a/pandas/tests/test_format.py +++ b/pandas/tests/test_format.py @@ -34,7 +34,9 @@ def curpath(): def has_info_repr(df): r = repr(df) - return r.split('\n')[0].startswith("