13
13
from pandas import json
14
14
from pandas .compat import map , zip , reduce , range , lrange
15
15
import pandas .compat as compat
16
+ from warnings import warn
16
17
17
18
18
- def read_excel (path_or_buf , sheetname , kind = None , ** kwds ):
19
+ def read_excel (path_or_buf , sheetname , ** kwds ):
19
20
"""Read an Excel table into a pandas DataFrame
20
21
21
22
Parameters
@@ -50,8 +51,11 @@ def read_excel(path_or_buf, sheetname, kind=None, **kwds):
50
51
parsed : DataFrame
51
52
DataFrame from the passed in Excel file
52
53
"""
53
- return ExcelFile (path_or_buf , kind = kind ).parse (sheetname = sheetname ,
54
- kind = kind , ** kwds )
54
+ if 'kind' in kwds :
55
+ kwds .pop ('kind' )
56
+ warn ("kind keyword is no longer supported in read_excel and may be "
57
+ "removed in a future version" , FutureWarning )
58
+ return ExcelFile (path_or_buf ).parse (sheetname = sheetname , ** kwds )
55
59
56
60
57
61
class ExcelFile (object ):
@@ -64,8 +68,7 @@ class ExcelFile(object):
64
68
path : string or file-like object
65
69
Path to xls or xlsx file
66
70
"""
67
- def __init__ (self , path_or_buf , kind = None , ** kwds ):
68
- self .kind = kind
71
+ def __init__ (self , path_or_buf , ** kwds ):
69
72
70
73
import xlrd # throw an ImportError if we need to
71
74
0 commit comments