File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 4
4
from io import BytesIO
5
5
import os
6
6
from textwrap import fill
7
+ import warnings
7
8
8
9
from pandas ._config import config
9
10
@@ -791,7 +792,7 @@ def close(self):
791
792
class ExcelFile :
792
793
"""
793
794
Class for parsing tabular excel sheets into DataFrame objects.
794
- Uses xlrd. See read_excel for more documentation
795
+ Uses xlrd, openpyxl or odf . See read_excel for more documentation
795
796
796
797
Parameters
797
798
----------
@@ -811,8 +812,14 @@ class ExcelFile:
811
812
_engines = {"xlrd" : _XlrdReader , "openpyxl" : _OpenpyxlReader , "odf" : _ODFReader }
812
813
813
814
def __init__ (self , io , engine = None ):
814
- if engine is None :
815
+ if engine == "xlrd" or engine is None :
815
816
engine = "xlrd"
817
+ warnings .warn (
818
+ "xlrd is deprecated and will be removed in a future "
819
+ "version. Use 'openpyxl' or 'odf' instead." ,
820
+ FutureWarning ,
821
+ stacklevel = 2 ,
822
+ )
816
823
if engine not in self ._engines :
817
824
raise ValueError ("Unknown engine: {engine}" .format (engine = engine ))
818
825
You can’t perform that action at this time.
0 commit comments