title: IndexError: too many indices when working with pandas data
body: <p>wrote a function that finds the peaks and troughs a signal and outputs to two ndarray objects from the numpy library called mintab and maxtab whose indices are timestamps and whose values are the value of the peak.</p>
  
  <p>I want to plot this data as a scatter plot with the timestampes as the x axis and values of peaks as y so i wrote this:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>But i keep getting an error that says: <code>IndexError: too many indices</code> and points to the line <code>xMin = mintab[:,0]</code></p>
  
  <p>I don't understand why this is happening and i can't find anything on google about it.</p>