如何操作zip CSV文件的数据 [英] How do manipulate data of zip CSV file on the fly
本文介绍了如何操作zip CSV文件的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有供应商Feed的网址,其中包含zip格式的csv文件。我想自动下载该文件并解压然后主要有两个主要栏目[price,break1],我只想合并这两栏并创建第三栏最终价格如
价格 - > Break1 - > [最终价格]
10 - > 5 - > 50
5 - > 5 - > 25
20 - > 4 - > 80
然后只需将其上传到ftp位置。
谢谢
I have a URL of supplier feed which contains csv file in zip format. I want to automatically download that file and unzip then there two main column mainly [ price , break1 ] , i just want to merge this two column and create third column " final price " like
Price -> Break1 -> [ final price ]
10 -> 5 -> 50
5 -> 5 -> 25
20 -> 4 -> 80
then simply upload it to the ftp location.
Thank you
推荐答案
您需要从zip中提取,操作数据,然后将更新的文件添加到新的zip存档。
这里 [ ^ ]是一些帮助读取和写入zip。
You will need to extract from the zip, manipulate the data and then add the updated file to a new zip archive.
Here[^] is some help on reading and writing to zip.
这篇关于如何操作zip CSV文件的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文