# Export CSV from tables

I am reading my csv which looks like:

float,float,float,integer,boolean

table = Take[Import["~/myfile.csv"]];
x = table[[All, 1]];
y = table[[All, 2]];
z = table[[All, 3]];
time = table[[All, 4]];
bool = table[[All, 5]];


Then I do some job with x,y,z and I need to export it back to csv. But I dont know how to get the table to export.

-
Put it in a list like so: list={x, y, z, time, bool}; and then Export["newfile.csv",list,"CSV"] –  Pickett Apr 13 at 20:12
it puts every table into one row. I need it as columns seperated by comma –  SpeedEX505 Apr 13 at 20:19
I what @Pickett suggests is basically correct, but I also that you get an output table more to your liking by using list = Transpose @ {x, y, z, time, bool};. That will put things back into columns. –  m_goldberg Apr 13 at 20:21
BTW, {x, y, z, time, bool} = Transpose[table]; is an easy way to extract column data. –  m_goldberg Apr 13 at 20:24
It works, thank you :) If you write it as an answer I'll mark it as solved. –  SpeedEX505 Apr 13 at 20:25

This is a job for Transpose.
table = Take[Import["~/myfile.csv"]];