File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1313 "lxml.etree" : "3.8.0" ,
1414 "matplotlib" : "2.2.2" ,
1515 "numexpr" : "2.6.2" ,
16+ "odfpy" , "1.3.0" ,
1617 "openpyxl" : "2.4.8" ,
1718 "pandas_gbq" : "0.8.0" ,
1819 "pyarrow" : "0.9.0" ,
Original file line number Diff line number Diff line change 11import pandas as pd
22
3+ from pandas .compat ._optional import import_optional_dependency
4+
35from pandas .io .parsers import TextParser
46
57
@@ -12,15 +14,10 @@ class _ODFReader:
1214 an open readable stream.
1315 """
1416 def __init__ (self , filepath_or_buffer ):
15- try :
16- from odf .opendocument import load as document_load
17- from odf .table import Table
18- except ImportError :
19- raise ImportError ("Install odfpy >= 1.3 for OpenDocument support" )
20-
21- self .filepath_or_buffer = filepath_or_buffer
17+ import_optional_dependency ("odf" )
2218 self .document = document_load (filepath_or_buffer )
2319 self .tables = self .document .getElementsByType (Table )
20+ super ().__init__ (filepath_or_buffer )
2421
2522 @property
2623 def sheet_names (self ):
You can’t perform that action at this time.
0 commit comments