Skip to content

Commit c39db5e

Browse files
authored
Update common.py
BUG: use mode when opening ZipFile. pandas-dev#17778
1 parent 22515f5 commit c39db5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def _get_handle(path_or_buf, mode, encoding=None, compression=None,
357357
# ZIP Compression
358358
elif compression == 'zip':
359359
import zipfile
360-
zip_file = zipfile.ZipFile(path_or_buf)
360+
zip_file = zipfile.ZipFile(path_or_buf, mode)
361361
zip_names = zip_file.namelist()
362362
if len(zip_names) == 1:
363363
f = zip_file.open(zip_names.pop())

0 commit comments

Comments
 (0)