title: Overwriting existing dataframe in loop
body: <p>I am trying to transform elements in various data frames (standardize numerical values to be between 0 and 1, one-hot encode categorical variables) but when I try to overwrite the dataframe in a loop it doesn't modify the existing dataframe, only the loop variable. Here is a dummy example:</p>
  
  <pre><code>t = pd.DataFrame(np.arange(1, 16).reshape(5, 3))
  b = pd.DataFrame(np.arange(1, 16).reshape(5, 3))
  
  for hi in [t, b]:
      hi = pd.DataFrame(np.arange(30, 45).reshape(5, 3))
  </code></pre>
  
  <p>But when I run this code both t and b have their original values. How can I overwrite the original dataframe (t or b) while in a loop?</p>
  
  <p>The specific problem I'm running into is when trying to use get_dummies function in the loop:</p>
  
  <pre><code>hi = pd.get_dummies(hi, columns=['column1'])
  </code></pre>