diff --git a/doc/source/release.rst b/doc/source/release.rst index 0e6924e4b0122..1aaed66d0daa5 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -73,6 +73,7 @@ API Changes - ``dtypes`` and ``ftypes`` now return a series with ``dtype=object`` on empty containers (:issue:`5740`) - ``df.to_csv`` will now return a string of the CSV data if neither a target path nor a buffer is provided (:issue:`6061`) +- ``df.to_html`` will now print out the header of an empty dataframe (:issue:`6062`) - The ``interpolate`` ``downcast`` keyword default has been changed from ``infer`` to ``None``. This is to preseve the original dtype unless explicitly requested otherwise (:issue:`6290`). - allow a Series to utilize index methods depending on its index type, e.g. ``Series.year`` is now defined diff --git a/doc/source/v0.14.0.txt b/doc/source/v0.14.0.txt index d773f3e7df799..e101cc1d1dd2b 100644 --- a/doc/source/v0.14.0.txt +++ b/doc/source/v0.14.0.txt @@ -41,6 +41,8 @@ These are out-of-bounds selections - The ``DataFrame.interpolate()`` ``downcast`` keyword default has been changed from ``infer`` to ``None``. This is to preseve the original dtype unless explicitly requested otherwise (:issue:`6290`). +- When converting a dataframe to HTML it used to return `Empty DataFrame`. This special case has + been removed, instead a header with the column names is returned (:issue:`6062`). - allow a Series to utilize index methods depending on its index type, e.g. ``Series.year`` is now defined for a Series with a ``DatetimeIndex`` or a ``PeriodIndex``; trying this on a non-supported Index type will now raise a ``TypeError``. (:issue:`4551`, :issue:`4056`, :issue:`5519`) diff --git a/pandas/core/format.py b/pandas/core/format.py index 537fdc6cd0a27..7108be9fb0851 100644 --- a/pandas/core/format.py +++ b/pandas/core/format.py @@ -694,17 +694,9 @@ def write_result(self, buf): self.write('
Index([], dtype='object') | -Empty DataFrame | + +|