我在获取压缩文件中的txt文件以使用pandas加载/连接时遇到问题。这里有很多例子帕金森病(邮编_文件.打开)但仍然没有得到任何工作在我的情况下,因为我有一个以上的zip文件和多个txt文件在每一个。在
例如,假设我在一个特定的文件夹“Main”中有两个压缩文件。每个压缩文件包含五个txt文件。我想阅读所有这些txt文件帕金森病他们都在一起。在我的实际例子中,我将有几十个zip文件夹,每个文件夹包含五个txt文件。在
你能帮忙吗?在
文件夹和文件结构,例如:
'C:/User/Example/Main'
TAG_001.zip
sample001_1.txt
sample001_2.txt
sample001_3.txt
sample001_4.txt
sample001_5.txt
TAG_002.zip
sample002_1.txt
sample002_2.txt
sample002_3.txt
sample002_4.txt
sample002_5.txt
我是这样开始的,但是之后的一切都是错误的:
^{pr2}$
这不是有效的,但它应该能让你知道如何做。在
根据数据量的不同,您必须设计一个平衡处理能力/内存/磁盘空间的解决方案。此解决方案可能会占用大量内存。在
相关问题 更多 >
编程相关推荐