title: Getting positional index out of bound error
body: <p>I'm loading data from a folder by using this code:  </p>
  
  <pre><code>Diabetes=pd.read_csv('datasource/ScoringDatasheet.csv')  
  </code></pre>
  
  <p>I'm using this code because there are 61 columns in my <code>csv</code>.  </p>
  
  <pre><code>inputData=Diabetes.iloc[:,:62]
  outputData=Diabetes.iloc[:,62]  
  </code></pre>
  
  <p>Then I'm using <code>logistic regression</code> to plot <code>ROC</code>  </p>
  
  <pre><code>from sklearn.linear_model import LogisticRegression
  logit1=LogisticRegression()
  logit1.fit(inputData,outputData)
  
  logit1.score(inputData,outputData)
  
  
  
  np.mean(logit1.predict(inputData)==outputData)
  
  trueInput=Diabetes.ix[Diabetes['Outcome']==1].iloc[:,:62]
  trueOutput=Diabetes.ix[Diabetes['Outcome']==1].iloc[:,62]
  
  np.mean(logit1.predict(trueInput)==trueOutput)
  
  falseInput=Diabetes.ix[Diabetes['Outcome']==0].iloc[:,:62]
  falseOutput=Diabetes.ix[Diabetes['Outcome']==0].iloc[:,62]
  
  np.mean(logit1.predict(falseInput)==falseOutput)
  
  
  
  
  
  from sklearn.metrics import confusion_matrix, roc_curve, roc_auc_score
  confusion_matrix(logit1.predict(inputData),outputData)
  
  
  fpr, tpr,_=roc_curve(logit1.predict(inputData),outputData,drop_intermediate=False)
  import matplotlib.pyplot as plt
  plt.figure()
  plt.plot(fpr, tpr, color='red', lw=2, label='ROC curve')
  plt.plot([0, 1], [0, 1], color='blue', lw=2, linestyle='--')
  plt.xlabel('False Positive ')
  plt.ylabel('True Positive ')
  plt.title('ROC curve')
  plt.show()
  
  
  roc_auc_score(logit1.predict(inputData),outputData)
  
  coef_DF=pd.DataFrame(data={'Variable':list(inputData),
  'value':(logit1.coef_[0])})
  
  coef_DF_standardised=pd.DataFrame(data={'Variable':list(inputData),
  'value':(logit1.coef_[0])*np.std(inputData,axis=0)/np.std(outputData)})
  
  import matplotlib.pyplot as plt
  plt.figure()
  plt.scatter(inputData.iloc[:,1],inputData.iloc[:,5],c=logit1.predict_proba(inputData)[:,1],alpha=0.4)
  plt.xlabel('Glucose level ')
  plt.ylabel('BMI ')
  plt.show()
  
  plt.figure()
  plt.scatter(inputData.iloc[:,1],inputData.iloc[:,5],c=outputData,alpha=0.4)
  plt.xlabel('Glucose level ')
  plt.ylabel('BMI ')
  plt.show()  
  </code></pre>
  
  <p>Don't worry about labels. I can change them later, but I'm getting error as given below:  </p>
  
  <pre><code>Traceback (most recent call last):
    File "index.py", line 9, in &lt;module&gt;
      outputData=Diabetes.iloc[:,62]
    File "C:\Users\kulkaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\indexing.py", line 1472, in __getitem__
      return self._getitem_tuple(key)
    File "C:\Users\kulkaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\indexing.py", line 2013, in _getitem_tuple
      self._has_valid_tuple(tup)
    File "C:\Users\kulkaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\indexing.py", line 222, in _has_valid_tuple
      self._validate_key(k, i)
    File "C:\Users\kulkaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\indexing.py", line 1957, in _validate_key
      self._validate_integer(key, axis)
    File "C:\Users\kulkaa\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\core\indexing.py", line 2009, in _validate_integer
      raise IndexError("single positional indexer is out-of-bounds")
  IndexError: single positional indexer is out-of-bounds  
  </code></pre>
  
  <p>Is number of columns correct or am I missing anything here? </p>