【发布时间】:2013-11-11 13:28:59
【问题描述】:
我有一个非常大的 CSV 文件(超过 1 亿条记录),我想从中删除几列。我已经尝试了应用程序 CSVed (http://csved.sjfrancke.nl/#csvuni),但是这个大小的文件将无法打开。有人知道我需要进入命令行界面来删除特定列吗?我正在使用 Windows 7。
以下是我目前拥有的列。我在要删除的列旁边放置了一个“X”。
- 域名
- registrarName - X
- contactEmail - X
- whoisServer - X
- nameServers - X
- createdDate - X
- 更新日期 - X
- expiresDate - X
- standardRegCreatedDate - X
- standardRegUpdatedDate - X
- standardRegExpiresDate - X
- 状态 - X
- Audit_auditUpdatedDate - X
- registrant_email
- 注册人姓名
- registrant_organization
- registrant_street1
- registrant_street2
- registrant_street3
- registrant_street4
- registrant_city
- registrant_state
- registrant_postalCode
- registrant_country
- registrant_fax - X
- registrant_faxExt - X
- registrant_telephone
- registrant_telephoneExt
- administrativeContact_email
- administrativeContact_name
- administrativeContact_organization
- administrativeContact_street1
- administrativeContact_street2
- administrativeContact_street3
- administrativeContact_street4
- administrativeContact_city
- administrativeContact_state
- administrativeContact_postalCode
- administrativeContact_country
- administrativeContact_fax - X
- administrativeContact_faxExt - X
- administrativeContact_telephone
- administrativeContact_telephoneExt
【问题讨论】:
-
你到底想做什么?你在哪里工作:Windows / UNIX / Mac?发布一些示例输入和所需的输出。
-
你可以看看 Perl 的 Text::CSV 模块来编写一个小脚本。
标签: csv command-line fastercsv