I am trying to read a csv file with numpy and I have the following code
from numpy import genfromtxt data = genfromtxt(open('errerr.csv', "r"), names=True, delimiter=',')
and the following is issued
(nan, nan, nan, nan, nan, nan, nan), (nan, nan, nan, nan, nan, nan, nan), (nan, nan, nan, nan, nan, nan, nan)], dtype=[('name', '<f8'), ('severity', '<f8'), ('Message', '<f8'), ('AppDomainName', '<f8'), ('ProcessName', '<f8'), ('clientid', '<f8'), ('type', '<f8')])
dtype looks fine
and just prove that I'm not losing my mind. I tried this code
import csv f = open('errors.csv', 'rt') reader = csv.reader(f) data = [] for r in reader: data.append(r) f.close()
which works fine, but I'm trying to figure out what the deal with genfromtxt is
here is an example from csv
name,severity,Message,AppDomainName,ProcessName,clientid,type Strings strings,Error,") Thread Name: Extended Properties:",SunDSrvc.exe,C:\Program Files\\SunDSrvc.exe,5DAA9377 ,Client Strings strings,Error,") Thread Name: Extended Properties:",SunDSrvc.exe,C:\Program Files\\SunDSrvc.exe,5DAA9377 ,Client Strings strings,Error,") Thread Name: Extended Properties:",SunDSrvc.exe,C:\Program Files\\SunDSrvc.exe,5DAA9377 ,Client