[英]How to read the text files in gzip format without unzipping it write that line to excel using python?
Problem Statement : I have a directory with gzip files , and each gzip file contains a text file. 问题陈述:我有一个包含gzip文件的目录,每个gzip文件都包含一个文本文件。 I have written a code in such a way that it unzips all the gzip files and then used to read each unzipped text file and then combined that output to one text file, then applied a condition , if that condition meets then it writes to excel.
我以这样一种方式编写了代码:将所有gzip文件解压缩,然后用于读取每个解压缩的文本文件,然后将输出合并到一个文本文件,然后应用条件,如果满足该条件,则将其写入excel。 The above process is bit tedious and lengthy.
上面的过程有点繁琐和冗长。 Can anyone please help me out in writing the code where the data is read directly from the txt file which is gzipped and write it contents to excel.
任何人都可以帮助我编写代码,直接从压缩后的txt文件中读取数据并将其内容写入excel。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.