You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic in that method was not handling correctly all the possible
combinations of skiprows, header and index_col arguments.
Specifically:
- it was not able to handle correctly multi index header
with holes (for instance, `header=[0,2]`.
- multi index header and skiprows given as lists.
- forward filling index columns and skiprows gigen as lists.
- inconsistences processing one-element list arguments (for instance,
`header=1` and `header=[1]` or `index_col=0` and `index_col=[0]` where
handled differently).
The logic has been revamped, because it was not possible to fix all
the errors with local changes.
The mayor challenge was handling skiprows as a list, as it may remove
rows at any place (before, between or after header(s), index names and
data). Also, header row indexes reference rows **after** removing
skiprows.
To handle that we use an intermediate mapping `ixmap` which goes from
the row indixes with skiprows removed to the row indixes in `data`.
Finally, let me add that IMO, most of the functionality of
_parse_sheet should be moved down into TextParser... but that's work
for another day!
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v3.0.0.rst
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -567,6 +567,7 @@ I/O
567
567
- Bug in :meth:`read_csv` causing segmentation fault when ``encoding_errors`` is not a string. (:issue:`59059`)
568
568
- Bug in :meth:`read_csv` raising ``TypeError`` when ``index_col`` is specified and ``na_values`` is a dict containing the key ``None``. (:issue:`57547`)
569
569
- Bug in :meth:`read_csv` raising ``TypeError`` when ``nrows`` and ``iterator`` are specified without specifying a ``chunksize``. (:issue:`59079`)
570
+
- Bug in :meth:`read_excel` multiindex head with holes (:issue:`58898`)
570
571
- Bug in :meth:`read_excel` raising ``ValueError`` when passing array of boolean values when ``dtype="boolean"``. (:issue:`58159`)
571
572
- Bug in :meth:`read_json` not validating the ``typ`` argument to not be exactly ``"frame"`` or ``"series"`` (:issue:`59124`)
572
573
- Bug in :meth:`read_stata` raising ``KeyError`` when input file is stored in big-endian format and contains strL data. (:issue:`58638`)
0 commit comments