Skip to content

Commit cca1f6c

Browse files
committed
Updating discrepancies in documentation, restricting except statement to check for TypeError
1 parent 1d6677f commit cca1f6c

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

doc/source/user_guide/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3786,7 +3786,7 @@ one can pass an :class:`~pandas.io.excel.ExcelWriter`.
37863786
.. _io.excel_writing_buffer:
37873787

37883788
When using the ``engine_kwargs`` parameter, pandas will pass these arguments to the
3789-
engine.For this, it is important to know which function pandas is using internally.
3789+
engine. For this, it is important to know which function pandas is using internally.
37903790

37913791
* For the engine openpyxl, pandas is using :func:`openpyxl.Workbook` to create a new sheet and :func:`openpyxl.load_workbook` to append data to an existing sheet. The openpyxl engine writes to (``.xlsx``) and (``.xlsm``) files.
37923792

doc/source/whatsnew/v2.1.0.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Other enhancements
8383
- :meth:`arrays.DatetimeArray.map`, :meth:`arrays.TimedeltaArray.map` and :meth:`arrays.PeriodArray.map` can now take a ``na_action`` argument (:issue:`51644`)
8484
- :meth:`arrays.SparseArray.map` now supports ``na_action`` (:issue:`52096`).
8585
- Add :meth:`diff()` and :meth:`round()` for :class:`Index` (:issue:`19708`)
86-
- Add dtype of categories to ``repr`` information of :class:`CategoricalDtype` (:issue:`52179`)l
86+
- Add dtype of categories to ``repr`` information of :class:`CategoricalDtype` (:issue:`52179`)
8787
- Added to the escape mode "latex-math" preserving without escaping all characters between "\(" and "\)" in formatter (:issue:`51903`)
8888
- Adding ``engine_kwargs`` parameter to :meth:`DataFrame.read_excel` (:issue:`52214`)
8989
- Classes that are useful for type-hinting have been added to the public API in the new submodule ``pandas.api.typing`` (:issue:`48577`)
@@ -97,11 +97,10 @@ Other enhancements
9797
- Let :meth:`DataFrame.to_feather` accept a non-default :class:`Index` and non-string column names (:issue:`51787`)
9898
- Performance improvement in :func:`read_csv` (:issue:`52632`) with ``engine="c"``
9999
- :meth:`Categorical.from_codes` has gotten a ``validate`` parameter (:issue:`50975`)
100-
- Adding ``engine_kwargs`` parameter to :meth:`DataFrame.to_excel` (:issue:`53220`)
100+
- Added ``engine_kwargs`` parameter to :meth:`DataFrame.to_excel` (:issue:`53220`)
101101
- Performance improvement in :func:`concat` with homogeneous ``np.float64`` or ``np.float32`` dtypes (:issue:`52685`)
102102
- Performance improvement in :meth:`DataFrame.filter` when ``items`` is given (:issue:`52941`)
103103
-
104-
105104
.. ---------------------------------------------------------------------------
106105
.. _whatsnew_210.notable_bug_fixes:
107106

pandas/io/excel/_xlsxwriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def __init__(
214214

215215
try:
216216
self._book = Workbook(self._handles.handle, **engine_kwargs)
217-
except:
217+
except TypeError:
218218
self._handles.handle.close()
219219
raise
220220

0 commit comments

Comments
 (0)