Mathematica - Import CSV and process columns?

Posted by Casey on Stack Overflow See other posts from Stack Overflow or by Casey
Published on 2010-03-26T17:26:15Z Indexed on 2010/03/26 18:53 UTC
Read the original article Hit count: 340

Filed under:
|

I have a CSV file that is formatted like:

0.0023709,8.5752e-007,4.847e-008

and I would like to import it into Mathematica and then have each column separated into a list so I can do some math on the selected column.

I know I can import the data with:

Import["data.csv"]

then I can separate the columns with this:

StringSplit[data[[1, 1]], ","]

which gives:

{"0.0023709", "8.5752e-007", "4.847e-008"}

The problem now is that I don't know how to get the data into individual lists and also Mathematica does not accept scientific notation in the form 8.5e-007.

Any help in how to break the data into columns and format the scientific notation would be great.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about mathematica

Related posts about csv