title: How to save results into new dataframe after applying conditions in pandas?
body: <p>I have my IDs identified with the following line:</p>
  <pre><code>inactiveOne =  df['id'].loc[(df['Button'] == '-') &amp; (df['True/False'] == 'TRUE') &amp; (df['status'] == 'OK')]
  </code></pre>
  <p>How could I save my IDs as a new column in new dataframe?</p>
  <p>When I do the following, it creates a file but I have all rows truncated into one cell, instead of having hundreds of rows with my IDs.</p>
  <pre><code>df2 = pd.DataFrame(data={&quot;id&quot;: [inactiveOne]})
  df2.to_csv('test.csv', index=False)
  </code></pre>