I am a newbie trying to learn data visuallizaion using python. Actually, I was just trying to follow the example given by a cookbook, like:
import numpy
import os
os.chdir("Home/Desktop/Temporal_folder")
data = numpy.loadtxt ('ch02-data.csv', dtype= 'string', delimiter=',')
print (data)
but somehow it did not work out:
Traceback (most recent call last):
File "Home/PycharmProjects/Learning/Datavisuallization.py", line 5, in <module>
data = numpy.loadtxt ('ch02-data.csv', dtype= 'string', delimiter=',')
File "Home/anaconda/lib/python3.6/site-packages/numpy/lib/npyio.py", line 930, in loadtxt
dtype = np.dtype(dtype)
TypeError: data type "string" not understood
this is the data I used: "ch02-data.csv"
there were some similar issues posted, but I am not sure I understood what the answer tried to explain. Also, I checked the manual of numpy.loadtext(), still the answer does not seem to be obvious to me... any suggestion? https://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html