Skip to content Skip to sidebar Skip to footer

Numpy.loadtxt, Converters Error

I am trying to read CSV's type file. And it conclude a dates line. I write the code like this, as others teach me, but it is wrong. I don't know why. please help me. from matplotli

Solution 1:

try this:

from matplotlib.dates import bytespdate2num
dates=np.loadtxt('data.csv',delimiter=',',usecols=(1,),
             converters={ 1:bytespdate2num('%d-%m-%Y')})

Post a Comment for "Numpy.loadtxt, Converters Error"