genfromtxt returning NaN rows

You should also add encoding=None to avoid having the Deprecated Warning:

VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.

Your line should be like:

np.genfromtxt(txt, delimiter=',', names=True, dtype=None, encoding=None)

Your dtype isn't fine. It's specifying '<f8', a float, for each of the fields. You want strings. Try dtype=None:

 np.genfromtxt(txt,delimiter=',',names=True,dtype=None)

which produces:

array([ ('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')], 
      dtype=[('name', 'S15'), ('severity', 'S5'), ('Message', 'S39'), ('AppDomainName', 'S12'), ('ProcessName', 'S29'), ('clientid', 'S9'), ('type', 'S6')])

(I have removed extraneous stuff about delimiters within quotes)

Tags:

Python

Csv

Numpy