Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'File Import Usage' topicStudent Support Forum > General > "File Import Usage"

Next Comment >Help | Reply To Topic
Author Comment/Response
Tom
12/16/12 7:05pm

I want to import a comma delimited data file and choose this:

t = Import["Documents/dec10il.csv", "Table"];
17001,"Adams County, Illinois",2467,638,45,341,119,262,0,1062
17003,"Alexander County, Illinois",677,64,6,81,37,81,0,408
17005,"Bond County, Illinois",662,85,3,81,18,123,1,351

Then I want to get the first column and third column as:
17001,2467
17003,677
17005,622

How do I do that? What I've tried seems to give me only row data and that leads me to think that "Import" returns data as one column.

t[[1]][[3]]
"17005,\"Bond County, Illinois\",662,85,3,81,18,123,1,351"}

b = t[[All, {1, 3}]
17001,"Adams County, Illinois",2467,638,45,341,119,262,0,1062
17005,"Bond County, Illinois",662,85,3,81,18,123,1,351

c = t[[All, 1]
17001,"Adams County,Illinois",2467,638,45,341,119,262,0,1062



URL: ,

Subject (listing for 'File Import Usage')
Author Date Posted
File Import Usage Tom 12/16/12 7:05pm
Re: File Import Usage Bill Simpson 12/16/12 10:59pm
Re: Re: File Import Usage Tom 12/17/12 9:20pm
Next Comment >Help | Reply To Topic