We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d558bce commit 1905fccCopy full SHA for 1905fcc
pandas/io/common.py
@@ -726,6 +726,17 @@ def __init__(
726
self.archive_name = archive_name
727
self.multiple_write_buffer: Optional[Union[StringIO, BytesIO]] = None
728
729
+ # add csv file name like gz or bz2
730
+ try:
731
+ fname = os.path.basename(file)
732
+ if not isinstance(fname, bytes):
733
+ fname = fname.encode('latin-1')
734
+ if fname.endswith(b'.zip'):
735
+ xname = fname[:-4].decode('latin-1')
736
+ self.archive_name=xname
737
+ except:
738
+ pass
739
+
740
kwargs_zip: Dict[str, Any] = {"compression": zipfile.ZIP_DEFLATED}
741
kwargs_zip.update(kwargs)
742
0 commit comments