title: How to keep row index after running predict_proba() in Scikit-learn?
body: <p>I have created a logistic regression model to predict acceptance rate of a campaign, where 0 = not accepted and 1 = accepted. Now, I need to put together three specific columns: <code>person_id</code>, the actual acceptance <code>score</code> (1 or 0), and the output from sklearn's <code>predict_proba()</code>.</p>
  <p>Both <code>person_id</code> and its respective actual acceptance <code>score</code> I can get from the test set, so that is solved. However, if I want to merge the output from <code>predict_proba()</code> with <code>person_id</code> and <code>score</code> using their row index, then I have an issue. This is because <code>predict_proba()</code> resets the index. So, I cannot guarantee that if I were to concatenate it with the <code>person_id</code> and acceptance <code>score</code>, they would match its respective row. These are my questions:</p>
  <ol>
  <li><p>Is there any way I can return the <code>predict_proba()</code> keeping the original row index from X_test? Below is the line of code for predict_proba() on the X_test set.</p>
  <pre><code>df_proba = pd.DataFrame(model.predict_proba(X_test)[:,1], columns=['proba'])
  </code></pre>
  </li>
  <li><p>Does <code>predict_proba()</code> maintain row order despite reseting the index? Therefore, I could simply concatenate by column (axis=1)?</p>
  </li>
  </ol>