diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 998e48d96d6b3..1fcaabff89023 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -421,7 +421,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DatetimeIndex.indexer_at_time\ pandas.DatetimeIndex.snap\ pandas.DatetimeIndex.std\ - pandas.ExcelFile\ pandas.ExcelFile.parse\ pandas.HDFStore.append\ pandas.HDFStore.put\ @@ -966,7 +965,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DatetimeTZDtype\ pandas.DatetimeTZDtype.tz\ pandas.DatetimeTZDtype.unit\ - pandas.ExcelFile\ pandas.ExcelFile.parse\ pandas.ExcelWriter\ pandas.Flags\ diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 8a287beac7afd..3405be626b5f3 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -278,8 +278,17 @@ comment string and the end of the current line is ignored. skipfooter : int, default 0 Rows at the end to skip (0-indexed). -{storage_options} - +storage_options : dict, optional + Extra options that make sense for a particular storage connection, + e.g. host, port, username, password, etc. + + For HTTP(S) URLs the key-value pairs are forwarded to ``urllib.request.Request`` as header options. + For other URLs (e.g. starting with “s3://”, and “gcs://”), + the key-value pairs are forwarded to ``fsspec.open``. + + Please see ``fsspec`` and ``urllib`` for more details, + and for more examples on storage options, + refer `here `. dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable' Back-end data type applied to the resultant :class:`DataFrame` (still experimental). Behaviour is as follows: @@ -1483,8 +1492,24 @@ class ExcelFile: Please do not report issues when using ``xlrd`` to read ``.xlsx`` files. This is not supported, switch to using ``openpyxl`` instead. + storage_options : dict, optional + Extra options that make sense for a particular storage connection, + e.g. host, port, username, password, etc. + + For HTTP(S) URLs the key-value pairs are forwarded to ``urllib.request.Request`` as header options. + For other URLs (e.g. starting with “s3://”, and “gcs://”) the key-value pairs are forwarded to ``fsspec.open``. + + Please see ``fsspec`` and ``urllib`` for more details, + and for more examples on storage options refer `here `. engine_kwargs : dict, optional Arbitrary keyword arguments passed to excel engine. + + See Also + -------- + DataFrame.to_excel : Write DataFrame to an Excel file. + DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file. + read_csv : Read a comma-separated values (csv) file into DataFrame. + read_fwf : Read a table of fixed-width formatted lines into DataFrame. Examples -------- @@ -1492,7 +1517,6 @@ class ExcelFile: >>> with pd.ExcelFile("myfile.xls") as xls: # doctest: +SKIP ... df1 = pd.read_excel(xls, "Sheet1") # doctest: +SKIP """ - from pandas.io.excel._calamine import CalamineReader from pandas.io.excel._odfreader import ODFReader from pandas.io.excel._openpyxl import OpenpyxlReader