Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

BYTE editors are people who separate the wheat from the chaff, and then carefully print the chaff.


devel / comp.lang.python / Re: Pandas: Multiple CSVs in one Zip file

SubjectAuthor
o Re: Pandas: Multiple CSVs in one Zip filePeter J. Holzer

1
Re: Pandas: Multiple CSVs in one Zip file

<mailman.471.1629971983.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=14753&group=comp.lang.python#14753

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: hjp-pyt...@hjp.at (Peter J. Holzer)
Newsgroups: comp.lang.python
Subject: Re: Pandas: Multiple CSVs in one Zip file
Date: Thu, 26 Aug 2021 11:59:34 +0200
Lines: 51
Message-ID: <mailman.471.1629971983.4164.python-list@python.org>
References: <CADrxXXkz7PB-cbSOvHciS5Qmf7u=Dp=Xm4-TbtY2-3YG7PFdfw@mail.gmail.com>
<20210826095934.GA24778@hjp.at>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft"
X-Trace: news.uni-berlin.de O7aKmmW4n39T3413cN9N+wi1Uls3uSdFe6dlvGur5PIQ==
Return-Path: <hjp-python@hjp.at>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.001
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'content-
type:multipart/signed': 0.05; 'file?': 0.05; 'content-
type:application/pgp-signature': 0.09; 'filename:fname piece:asc':
0.09; 'filename:fname piece:signature': 0.09;
'filename:fname:signature.asc': 0.09; 'pandas': 0.09;
'url:discuss': 0.09; 'valueerror:': 0.09; '"creative': 0.16;
'__/': 0.16; 'algorithm,': 0.16; 'challenge!"': 0.16;
'compression': 0.16; 'from:addr:hjp-python': 0.16;
'from:addr:hjp.at': 0.16; 'from:name:peter j. holzer': 0.16;
'hjp@hjp.at': 0.16; 'holzer': 0.16; 'janhangeer': 0.16;
'reality.': 0.16; 'stross,': 0.16; 'subject:Pandas': 0.16; 'url-
ip:212.17.106.137/32': 0.16; 'url-ip:212.17.106/24': 0.16; 'url-
ip:212.17/16': 0.16; 'url:hjp': 0.16; '|_|_)': 0.16; 'wrote:':
0.16; 'that.': 0.16; 'way.': 0.20; 'purposes': 0.23;
'subject:file': 0.23; 'to:addr:python-list': 0.23; 'cannot': 0.24;
'zip': 0.27; 'else': 0.27; 'single': 0.28; 'sense': 0.28; 'error':
0.28; '(and': 0.30; 'header:User-Agent:1': 0.31; 'but': 0.31;
'formats': 0.32; 'header:In-Reply-To:1': 0.33; 'files': 0.33;
'same': 0.34; 'contains': 0.35; 'trying': 0.36; 'file': 0.38;
'those': 0.38; 'read': 0.38; 'use': 0.38; 'does': 0.38; 'example':
0.40; 'received:userid': 0.64; 'url-ip:172.67/16': 0.64; 'per':
0.64; 'url-ip:104.21/16': 0.65; 'url:net': 0.66; 'received:212':
0.68; 'subject:one': 0.69; 'url-ip:212/8': 0.69; 'shows': 0.70;
'tool': 0.72; 'treat': 0.77; 'received:at': 0.84; 'vs.': 0.84
Content-Disposition: inline
In-Reply-To: <CADrxXXkz7PB-cbSOvHciS5Qmf7u=Dp=Xm4-TbtY2-3YG7PFdfw@mail.gmail.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <20210826095934.GA24778@hjp.at>
X-Mailman-Original-References: <CADrxXXkz7PB-cbSOvHciS5Qmf7u=Dp=Xm4-TbtY2-3YG7PFdfw@mail.gmail.com>
 by: Peter J. Holzer - Thu, 26 Aug 2021 09:59 UTC
Attachments: signature.asc (application/pgp-signature)

On 2021-08-26 11:09:21 +0400, Abdur-Rahmaan Janhangeer wrote:
> Cannot read one file in a zip file if the zip file contains multiple files.
>
> This example does not work https://www.py4u.net/discuss/203494 as Pandas
> shows a ValueError: Multiple files found in ZIP file. Only one file per ZIP.
>
> If the Zip file has one file, fine else i cannot find a way. Thanks

Is it possible that you are trying to treat the zip file as a gzip file?
Those are different file formats with different purposes (archive vs.
stream), but they use the same compression algorithm, and the gzip tool
(and - I presume - also the gzip library) can read a zip file with a
single member. The error message would match that.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

Attachments: signature.asc (application/pgp-signature)
1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor