I can read the data file fine, but as soon as I try to add the name parameter either by specifying the names myself or reading from the first row I get back empty strings
data_no_headers = genfromtxt('SimpleDataWithHeaders.csv',delimiter=',',dtype='str',autostrip=True)
print(data_no_headers)
data_with_headers = genfromtxt('SimpleDataWithHeaders.csv',delimiter=',',dtype='str',autostrip=True,names=True)
print(data_with_headers)
data_with_headers = genfromtxt('SimpleDataWithHeaders.csv',delimiter=',',skip_header=1,dtype='str',autostrip=True,names="A,B")
print(data_with_headers)
mycols = ['a','b']
data_with_headers = genfromtxt('SimpleDataWithHeaders.csv',delimiter=',',skip_header=1,dtype='str',autostrip=True,names=mycols)
print(data_with_headers)
If I execute this code I get the following output (I made a very simple csv file with three rows and a header row to illustrate the problem) you can see the output I get with each of the commands above. You can see it works fine until I add the names parameter
[['CODE' 'AIRPORT']
['HOU' 'Houston']
['ABQ' 'Alberquerque']
['BWI' 'Baltimore']]
[('', '') ('', '') ('', '')]
[('', '') ('', '') ('', '')]
[('', '') ('', '') ('', '')]