File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 6
6
from pandas import read_csv
7
7
from pandas import DataFrame
8
8
from pandas import to_datetime
9
- from pandas . io . common import ZipFile
9
+ import zipfile
10
10
from pandas .compat import StringIO
11
11
from pandas .core .common import is_number
12
12
@@ -65,7 +65,7 @@ def _read_zipfile(self, ftppath):
65
65
except EOFError :
66
66
raise RemoteDataError ('FTP server has closed the connection.' )
67
67
zipf .seek (0 )
68
- with ZipFile (zipf , 'r' ) as zf :
68
+ with zipfile . ZipFile (zipf , 'r' ) as zf :
69
69
data = zf .open (zf .namelist ()[0 ]).read ().decode ()
70
70
71
71
return StringIO (data )
Original file line number Diff line number Diff line change 1
1
import tempfile
2
2
import re
3
3
import datetime as dt
4
- from pandas . io . common import ZipFile
4
+ import zipfile
5
5
from pandas .compat import lmap , StringIO
6
6
from pandas import read_csv , to_datetime
7
7
@@ -61,7 +61,7 @@ def _read_zipfile(self, url):
61
61
with tempfile .TemporaryFile () as tmpf :
62
62
tmpf .write (raw )
63
63
64
- with ZipFile (tmpf , 'r' ) as zf :
64
+ with zipfile . ZipFile (tmpf , 'r' ) as zf :
65
65
data = zf .open (zf .namelist ()[0 ]).read ().decode ()
66
66
67
67
return data
You can’t perform that action at this time.
0 commit comments