1

I am just starting out in numpy. I am trying to load data from a csv file using numpy.I have lines in the data in this format

Input Format:

 893,3,"kelly,Mr. James",male,34.5. 

I am using genfromtxt to load it using delimiter = ',' , dtypes = None.

But using this loads the data as below:

893,3,'"kelly,' , ',Mr. James"', 'male', 34,5. 

Expected Output:

893,3,"kelly,Mr. James",'male',34,5.

Dont know how to use delimiters properly for this.

Saullo G. P. Castro
  • 56,802
  • 26
  • 179
  • 234
  • Have a look at this post at stackoverflow http://stackoverflow.com/questions/17933282/using-numpy-genfromtxt-to-read-a-csv-file-with-strings-containing-commas – Sainath Motlakunta Sep 20 '14 at 06:28

0 Answers0