title: A dict of pandas dataframes: how to know if referencing a copy of the dataframe in the dict or the dataframe inside the dict?
body: <p>Hi I've run into some interesting behavior that I can't find an explanation.</p>
  
  <p>I have a dict called combinedDict. It has string keys and its elements are pandas dataframes.</p>
  
  <p>I want to select the dataframe named 'early'. I create a variable <strong>a</strong> equal to that dataframe. I then want to edit the ID column in that dataframe by appending the string '_early' to each row of that column. I do this using the following code:</p>
  
  <pre><code>a = combinedDict['early']
  a['ID'] = [(s + '_early') for s in a['ID'].tolist()]
  </code></pre>
  
  <p>When I do this, the string '_early' is appended to every row of the column in dataframe a but it is also appended to every row of the dataframe stored in combinedDict['early'].</p>
  
  <p>On the other hand, when I use the following code, adding .copy(), only dataframe a is affected while the one stored in combinedDict['early'] is not. This is the first time I've run into this behavior. Is this just a feature of pandas dataframes?</p>