On 25 April 2013 00:01, Ana DionĂ­sio <anadionisio...@gmail.com> wrote:
> Hello!
>
> I have this script that scans a csv file and if the value in the first column 
> == 200 it saves that row into an array.
>
> The problem is, I need to save that row and the next 10 rows in that same 
> array. What can I add to the script so it does that? I tried to do for row in 
> len(10): but I get an error.
>
>
> p = csv.reader(open('file.csv'), delimiter=';')
> a=[0]*2881
> a = numpy.array(a, dtype=dict)

You shouldn't be using a numpy array for this; use a list instead. I
suggest that you have a go at the Python tutorial and avoid using
numpy until you are more confident with the basics of Python itself.

The tutorial (for Python 2) is here:
http://docs.python.org/2/tutorial/


Oscar
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to