Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.6K Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Import a specific column from a CSV file?

Posted 5 years ago

I used Data [All, column number]. But the whole table appeared. Not just the column I would like to extract. Thank you very much for your time!

POSTED BY: Yuening Zhang
4 Replies
Posted 5 years ago

Hi Yuening,

What is Data? To Import a specific column from a CSV file

Import["ExampleData/TreesOwnedByTheCityOfChampaign.csv", {"Data", All, 3}] (* column 3 *)
POSTED BY: Rohit Namjoshi
Posted 5 years ago

Thank you, Rohit. It worked! It was bibliographic data (publication time, title, author name...).

POSTED BY: Yuening Zhang
Posted 5 years ago
POSTED BY: Yuening Zhang
Posted 5 years ago

Try double square brackets: Data[[All, column number]].

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard