title: Apply a for loop to multiple DataFrames in Pandas
body: <p>I have multiple DataFrames that I want to do the same thing to.</p>
  
  <p>First I create a list of the DataFrames. All of them have the same column called 'result'.</p>
  
  <pre><code>df_list = [df1,df2,df3]
  </code></pre>
  
  <p>I want to keep only the rows in all the DataFrames with value 'passed' so I use a for loop on my list:</p>
  
  <pre><code>for df in df_list:
      df =df[df['result'] == 'passed']
  </code></pre>
  
  <p>...this does not work, the values are not filtered out of each DataFrame.</p>
  
  <p>If I filter each one separately then it does work.</p>
  
  <pre><code>df1 =df1[df1['result'] == 'passed']
  df2 =df2[df2['result'] == 'passed']
  df3 =df3[df3['result'] == 'passed']
  </code></pre>