By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,035 Members | 1,384 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,035 IT Pros & Developers. It's quick & easy.

Read CSV file into an array

P: n/a
I would like to know how to read a CSV file with a header ( n columns
of float data) into an array without the header row.

Jan 10 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
oyekomova wrote:
I would like to know how to read a CSV file with a header ( n columns
of float data) into an array without the header row.
Did you read our responses from the last time you asked this question?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Jan 10 '07 #2

P: n/a
oyekomova wrote:
I would like to know how to read a CSV file with a header ( n columns
of float data) into an array without the header row.
import csv

l = []
for line in csv.reader(open("my.csv").readlines()[1:]):
l.append(line)

Which really gets you a list of lists.

--
Posted via a free Usenet account from http://www.teranews.com

Jan 10 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.