Jump to content

Recommended Posts

Guest phi16181
Posted

So I have been working with a csv export for a few days now and I have the data almost in the form I need it in. I need some advice on how best to proceed to get to the solution I need.

 

Here is the problem:

 

My csv export contains multiple rows (over 2000) of data in this format:

 

Code:

data1,data2,data3,data4

data1,data2,data3,data4

data1,data2,data3,data4

and I need to convert groups of three rows into one single line like this:

 

Code:

data1,data2,data3,data4,data1,data2,data3,data4,data1,data2,data3,data4

It looks like Bash and Python might be options for doing this.

 

Any thoughts on how you might handle this would be greatly appreciated.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...