title: Don't understand: ValueError: Can only tuple-index with a MultiIndex
body: <p>I know this question already exists, but the answers havent helped me. </p>
  
  <pre><code>def function(T,theta,A):
     x=(T-theta)/A
     return(x)
  
  filen=pd.read_csv('filename')
  filelist=[file,file2,...,filen)
  labels=['name1','name2',...]
  colors=['red','blue','green',...]
  for i in range(len(filelist)):
      x=filelist[i]['column1']
      y=filelist[i]['column2']
      y2=(1/y)
      plt.plot(x, y2, colors[i], label=labels[i])
      plt.legend()
      plt.plot()
      w=np.where(x&gt;170)
      print(x[w])  #error, can only tuple index with multiindex
      other_fit=curve_fit(function,x,y)
      popt, pcov=other_fit
      plt.plot(x, function(x, *popt), colors2[i], label=labels2[i])
      plt.show()
  </code></pre>
  
  <p>The error occurs at <code>x[w]</code>.<br>
  When I am not in the for loop, there is no error.  </p>
  
  <blockquote>
    <p>The error message is as follows:</p>
  
  <pre><code>ValueError: Can only tuple-index with a MultiIndex
  </code></pre>
  </blockquote>