File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 13
13
"lxml.etree" : "3.8.0" ,
14
14
"matplotlib" : "2.2.2" ,
15
15
"numexpr" : "2.6.2" ,
16
+ "odfpy" , "1.3.0" ,
16
17
"openpyxl" : "2.4.8" ,
17
18
"pandas_gbq" : "0.8.0" ,
18
19
"pyarrow" : "0.9.0" ,
Original file line number Diff line number Diff line change 1
1
import pandas as pd
2
2
3
+ from pandas .compat ._optional import import_optional_dependency
4
+
3
5
from pandas .io .parsers import TextParser
4
6
5
7
@@ -12,15 +14,10 @@ class _ODFReader:
12
14
an open readable stream.
13
15
"""
14
16
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" )
22
18
self .document = document_load (filepath_or_buffer )
23
19
self .tables = self .document .getElementsByType (Table )
20
+ super ().__init__ (filepath_or_buffer )
24
21
25
22
@property
26
23
def sheet_names (self ):
You can’t perform that action at this time.
0 commit comments