@@ -3466,8 +3466,6 @@ See the :ref:`cookbook<cookbook.excel>` for some advanced strategies.
3466
3466
3467
3467
.. warning ::
3468
3468
3469
- The `xlwt <https://xlwt.readthedocs.io/en/latest/ >`__ package for writing old-style ``.xls ``
3470
- excel files is no longer maintained.
3471
3469
The `xlrd <https://xlrd.readthedocs.io/en/latest/ >`__ package is now only for reading
3472
3470
old-style ``.xls `` files.
3473
3471
@@ -3481,12 +3479,6 @@ See the :ref:`cookbook<cookbook.excel>` for some advanced strategies.
3481
3479
**Please do not report issues when using ``xlrd`` to read ``.xlsx`` files. **
3482
3480
This is no longer supported, switch to using ``openpyxl `` instead.
3483
3481
3484
- Attempting to use the ``xlwt `` engine will raise a ``FutureWarning ``
3485
- unless the option :attr: `io.excel.xls.writer ` is set to ``"xlwt" ``.
3486
- While this option is now deprecated and will also raise a ``FutureWarning ``,
3487
- it can be globally set and the warning suppressed. Users are recommended to
3488
- write ``.xlsx `` files using the ``openpyxl `` engine instead.
3489
-
3490
3482
.. _io.excel_reader :
3491
3483
3492
3484
Reading Excel files
@@ -3788,7 +3780,7 @@ written. For example:
3788
3780
3789
3781
df.to_excel(" path_to_file.xlsx" , sheet_name = " Sheet1" )
3790
3782
3791
- Files with a `` .xls `` extension will be written using `` xlwt `` and those with a
3783
+ Files with a
3792
3784
``.xlsx `` extension will be written using ``xlsxwriter `` (if available) or
3793
3785
``openpyxl ``.
3794
3786
@@ -3849,35 +3841,26 @@ pandas supports writing Excel files to buffer-like objects such as ``StringIO``
3849
3841
Excel writer engines
3850
3842
''''''''''''''''''''
3851
3843
3852
- .. deprecated :: 1.2.0
3853
-
3854
- As the `xlwt <https://pypi.org/project/xlwt/ >`__ package is no longer
3855
- maintained, the ``xlwt `` engine will be removed from a future version
3856
- of pandas. This is the only engine in pandas that supports writing to
3857
- ``.xls `` files.
3858
-
3859
3844
pandas chooses an Excel writer via two methods:
3860
3845
3861
3846
1. the ``engine `` keyword argument
3862
3847
2. the filename extension (via the default specified in config options)
3863
3848
3864
3849
By default, pandas uses the `XlsxWriter `_ for ``.xlsx ``, `openpyxl `_
3865
- for ``.xlsm ``, and ` xlwt `_ for `` .xls `` files . If you have multiple
3850
+ for ``.xlsm ``. If you have multiple
3866
3851
engines installed, you can set the default engine through :ref: `setting the
3867
3852
config options <options>` ``io.excel.xlsx.writer `` and
3868
3853
``io.excel.xls.writer ``. pandas will fall back on `openpyxl `_ for ``.xlsx ``
3869
3854
files if `Xlsxwriter `_ is not available.
3870
3855
3871
3856
.. _XlsxWriter : https://xlsxwriter.readthedocs.io
3872
3857
.. _openpyxl : https://openpyxl.readthedocs.io/
3873
- .. _xlwt : http://www.python-excel.org
3874
3858
3875
3859
To specify which writer you want to use, you can pass an engine keyword
3876
3860
argument to ``to_excel `` and to ``ExcelWriter ``. The built-in engines are:
3877
3861
3878
3862
* ``openpyxl ``: version 2.4 or higher is required
3879
3863
* ``xlsxwriter ``
3880
- * ``xlwt ``
3881
3864
3882
3865
.. code-block :: python
3883
3866
0 commit comments