Skip to content

Commit 4fec952

Browse files
committed
Show new format, note on has_index_names
1 parent e12397c commit 4fec952

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

doc/source/whatsnew/v0.17.0.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ See the :ref:`docs <io.sas>` for more details.
189189

190190
Changes to Excel with ``MultiIndex``
191191
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
192-
In version 0.16.2 a ``DataFrame`` with ``MultiIndex`` columns could not be written to Excel via `to_excel`.
193-
That functionality has been added (:issue:`10564`), along with updating `read_excel` so that the data can
192+
In version 0.16.2 a ``DataFrame`` with ``MultiIndex`` columns could not be written to Excel via ``to_excel``.
193+
That functionality has been added (:issue:`10564`), along with updating ``read_excel`` so that the data can
194194
be read back with no loss of information by specifying which columns/rows make up the ``MultiIndex``
195195
in the `header` and `index_col` parameters (:issue:`4679`)
196196

@@ -214,6 +214,23 @@ in the `header` and `index_col` parameters (:issue:`4679`)
214214
import os
215215
os.remove('test.xlsx')
216216

217+
Previously, it was necessary to specifying the ``has_index_names`` argument in ``read_excel``
218+
if the serialized data had index names. For version 0.17 the ouptput format of ``to_excel``
219+
has been changed to make this keyword unnecessary - the change is shown below.
220+
221+
**Old**
222+
223+
.. image:: _static/old-excel-index.png
224+
225+
**New**
226+
227+
.. image:: _static/new-excel-index.png
228+
229+
.. warning::
230+
231+
Excel files saved in version 0.16.2 or prior that had index names will still able to be read in,
232+
but the ``has_index_names`` argument must specified to ``True``.
233+
217234
See the :ref:`documentation <io.excel>` for more details.
218235

219236
.. _whatsnew_0170.enhancements.other:

0 commit comments

Comments
 (0)