find max and min values from a column of a csv file
prakash jp
prakash.stack at gmail.com
Tue Jul 19 05:12:38 EDT 2011
Thanks for the suggestions. Felt the thread could be of help on
consolidating the solution.
*Max Value from a csv column:*
import numpy
data1 = numpy.genfromtxt("data.csv",dtype='float',delimiter =
',',skiprows=1, skip_header=0, skip_footer=0,
usecols=11,usemask=True)
#print data1
print data1.max()
Plz go through the below link to understand further on the arguments taken
by numpy.genfromtxt():
http://docs.scipy.org/doc/numpy-1.4.x/reference/generated/numpy.genfromtxt.html
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110719/18ba510c/attachment-0001.html>
More information about the Python-list
mailing list