arrays - Excel CSV help Python -


i have following csv file: enter image description here

how import numbers array in python 1 row @ time? no date, no string.

my code:

import csv  def test():     out = open("example.csv","rb")     data = csv.reader(out)     data = [row row in data]     out.close()     print data 

let me more clear. don't want huge 2d array. want import 2nd row , manipulate data 3rd row. need loop this, not sure on how csv works.

try this:

with open('the_csv_file.csv','r') f:   box = f.readlines()  result_box = [] line in box[1:]:   items = line.split(';') # adjust separator character in csv needed   result_box.append(items[1:])  print result_box 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -