IndexError: too many indices when working with pandas data
wrote a function that finds the peaks and troughs a signal and outputs to
two Sjects from the pandas library called mintab and maxtab.
I want to plot this data as a scatter plot so i wrote this:
xMax = maxtab[:,0]
yMax = maxtab[:,1]
xMin = mintab[:,0]
yMin = mintab[:,1]
mpl.rc('figure', figsize=(20, 2)) # configure plot
window size
plt.scatter(xMax, yMax, color='g', alpha=1)
plt.scatter(xMin, yMin, color= 'r', alpha = 1)
But i keep getting an error that says: IndexError: too many indices and
points to the line xMin = mintab[:,0]
I don't understand why this is happening and i can't find anything on
google about it.
No comments:
Post a Comment