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 idea is that we read the Excel file,
get the data, and then let the TextParser
handle the reading and parsing.
We shouldn't be doing a lot of work that
is already defined in parsers.py
In doing so, we identified several bugs:
* index_col=None was not being respected
* usecols behavior was inconsistent with
that of read_csv for list of strings and
callable inputs
* usecols was not being validated as proper
Excel column names when passed as a string.
Closesgh-18273.
Closesgh-20480.
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.24.0.txt
+3
Original file line number
Diff line number
Diff line change
@@ -238,6 +238,7 @@ Other Enhancements
238
238
- Added :meth:`Interval.overlaps`, :meth:`IntervalArray.overlaps`, and :meth:`IntervalIndex.overlaps` for determining overlaps between interval-like objects (:issue:`21998`)
239
239
- :func:`~DataFrame.to_parquet` now supports writing a ``DataFrame`` as a directory of parquet files partitioned by a subset of the columns when ``engine = 'pyarrow'`` (:issue:`23283`)
240
240
- :meth:`Timestamp.tz_localize`, :meth:`DatetimeIndex.tz_localize`, and :meth:`Series.tz_localize` have gained the ``nonexistent`` argument for alternative handling of nonexistent times. See :ref:`timeseries.timezone_nonexsistent` (:issue:`8917`)
241
+
- :meth:`read_excel()` now accepts ``usecols`` as a list of column names or callable (:issue:`18273`)
241
242
242
243
.. _whatsnew_0240.api_breaking:
243
244
@@ -1299,6 +1300,8 @@ Notice how we now instead output ``np.nan`` itself instead of a stringified form
1299
1300
- Bug in :meth:`HDFStore.append` when appending a :class:`DataFrame` with an empty string column and ``min_itemsize`` < 8 (:issue:`12242`)
1300
1301
- Bug in :meth:`read_csv()` in which :class:`MultiIndex` index names were being improperly handled in the cases when they were not provided (:issue:`23484`)
1301
1302
- Bug in :meth:`read_html()` in which the error message was not displaying the valid flavors when an invalid one was provided (:issue:`23549`)
1303
+
- Bug in :meth:`read_excel()` in which ``index_col=None`` was not being respected and parsing index columns anyway (:issue:`20480`)
1304
+
- Bug in :meth:`read_excel()` in which ``usecols`` was not being validated for proper column names when passed in as a string (:issue:`20480`)
0 commit comments