diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 8227047839f3d..66708eb88ca87 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -144,7 +144,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then MSG='Partially validate docstrings (GL08)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=GL08 --ignore_functions \ - pandas.ExcelFile.book\ pandas.Index.empty\ pandas.Index.names\ pandas.Index.view\ diff --git a/pandas/io/excel/_base.py b/pandas/io/excel/_base.py index 2977f62b4d3c5..a9da95054b81a 100644 --- a/pandas/io/excel/_base.py +++ b/pandas/io/excel/_base.py @@ -1631,6 +1631,32 @@ def parse( @property def book(self): + """ + Gets the Excel workbook. + + Workbook is the top-level container for all document information. + + Returns + ------- + Excel Workbook + The workbook object of the type defined by the engine being used. + + See Also + -------- + read_excel : Read an Excel file into a pandas DataFrame. + + Examples + -------- + >>> file = pd.ExcelFile("myfile.xlsx") # doctest: +SKIP + >>> file.book # doctest: +SKIP + + >>> file.book.path # doctest: +SKIP + '/xl/workbook.xml' + >>> file.book.active # doctest: +SKIP + + >>> file.book.sheetnames # doctest: +SKIP + ['Sheet1', 'Sheet2'] + """ return self._reader.book @property