如何解析以下格式的大型 csv 文件:
A,1,X:1,X:1,X:1,X:1...
我需要保存A
和所有1
的。我想将1
's 保存为逗号分隔:
A
1,1,1,1,1,1...
数据示例:
4217,23,4217:0.1304,11045842:0.0870,11027563:0.0435,15055960:0.0435,12556773:0.0435,10317812:0.0435,21268053:0.0435,14982717:0.0435,12560416:0.0435,21684075:0.0435,12177392:0.0435,878710:0.0435,21777845:0.0435,11045966:0.0435,17109375:0.0435,15701596:0.0435,10312162:0.0435,11045878:0.0435
我的期望:
4217
4217,11045842,11027563,15055960,12556773,10317812,21268053,14982717,12560416,21684075,12177392,878710,21777845,11045966,17109375,15701596,10312162,11045878