Skip to main content
updated expectation
Source Link
Yogzzz
  • 2.8k
  • 5
  • 39
  • 56

How can I parse a large csv file in the following format:

A,1,X:1,X:1,X:1,X:1...

I need to save Aand all the 1's. I want to save the 1's as comma separated:

A 1,1,1,1,1,1...

Example of data:

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

What I expect:

4217 4217,11045842,11027563,15055960,12556773,10317812,21268053,14982717,12560416,21684075,12177392,878710,21777845,11045966,17109375,15701596,10312162,11045878

How can I parse a large csv file in the following format:

A,1,X:1,X:1,X:1,X:1...

I need to save Aand all the 1's. I want to save the 1's as comma separated:

A 1,1,1,1,1,1...

Example of data:

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

How can I parse a large csv file in the following format:

A,1,X:1,X:1,X:1,X:1...

I need to save Aand all the 1's. I want to save the 1's as comma separated:

A 1,1,1,1,1,1...

Example of data:

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

What I expect:

4217 4217,11045842,11027563,15055960,12556773,10317812,21268053,14982717,12560416,21684075,12177392,878710,21777845,11045966,17109375,15701596,10312162,11045878

added 321 characters in body
Source Link
Yogzzz
  • 2.8k
  • 5
  • 39
  • 56

How can I parse a large csv file in the following format:

A,1,X:1,X:1,X:1,X:1...

I need to save Aand all the 1's. I want to save the 1's as comma separated:

A 1,1,1,1,1,1...

Example of data:

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

How can I parse a large csv file in the following format:

A,1,X:1,X:1,X:1,X:1...

I need to save Aand all the 1's. I want to save the 1's as comma separated:

A 1,1,1,1,1,1...

How can I parse a large csv file in the following format:

A,1,X:1,X:1,X:1,X:1...

I need to save Aand all the 1's. I want to save the 1's as comma separated:

A 1,1,1,1,1,1...

Example of data:

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
Source Link
Yogzzz
  • 2.8k
  • 5
  • 39
  • 56

Parsing CSV file

How can I parse a large csv file in the following format:

A,1,X:1,X:1,X:1,X:1...

I need to save Aand all the 1's. I want to save the 1's as comma separated:

A 1,1,1,1,1,1...