diff --git a/doc/source/whatsnew/v1.1.1.rst b/doc/source/whatsnew/v1.1.1.rst index 565b4a014bd0c..4b25b1c1bf51a 100644 --- a/doc/source/whatsnew/v1.1.1.rst +++ b/doc/source/whatsnew/v1.1.1.rst @@ -27,6 +27,7 @@ Fixed regressions - Fixed regression where :meth:`DataFrame.merge_asof` would raise a ``UnboundLocalError`` when ``left_index`` , ``right_index`` and ``tolerance`` were set (:issue:`35558`) - Fixed regression in ``.groupby(..).rolling(..)`` where a custom ``BaseIndexer`` would be ignored (:issue:`35557`) - Fixed regression in :meth:`~pandas.core.groupby.DataFrameGroupBy.agg` where a list of functions would produce the wrong results if at least one of the functions did not aggregate. (:issue:`35490`) +- Fixed regression in :func:`pandas.read_excel` where ``encoding`` was removed but is necessary for some files (:issue:`35753`) .. --------------------------------------------------------------------------- diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index b1bbda4a4b7e0..aee705976f3d1 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -199,6 +199,8 @@ Duplicate columns will be specified as 'X', 'X.1', ...'X.N', rather than 'X'...'X'. Passing in False will cause data to be overwritten if there are duplicate names in the columns. +encoding : str, default "utf-8" + The encoding to use to decode bytes. Returns ------- @@ -298,6 +300,7 @@ def read_excel( skipfooter=0, convert_float=True, mangle_dupe_cols=True, + encoding: str = "utf-8", ): if not isinstance(io, ExcelFile): @@ -332,6 +335,7 @@ def read_excel( skipfooter=skipfooter, convert_float=convert_float, mangle_dupe_cols=mangle_dupe_cols, + encoding=encoding, )