比较两个大的 csv 文件
我正在尝试比较两个大型 CSV 文件(260Gb 和 16GB),我想到了两种方法,
取出特定列(使用列号),附加到新的 csv。我认为它可能会减少大小,然后我将创建块
- 每次运行代码以基于一个列值提取一组列时创建块,例如: 如果 col['name'] == 'disney' ,则取出与该值匹配的行并附加到新的 csv。 最后将新的 csv 与 16gb csv 文件进行比较。
关于这里最好的方法是什么有什么建议吗?
I am trying to compare two large CSV files( 260Gb and 16gb) , I have two approaches in mind,
taking out particular columns(using column numbers), append to new csv. I think it might reduce size and then I will be to create chunks
each time run a code to extract a set of columns based on a one column value, eg:
if col['name'] == 'disney' , then take out rows matching that value and append to new csv.
Finally comparing new csv with 16gb csv file.
Any suggestions on what would be the best approach here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论