title: How can I directly assign a value to a dataframe using chain indexing?
body: <p>What I am doing is as follows:</p>
  
  <pre><code>for i in range(0, len(x.index)-1):
      x['Low'][i][x['Low'][i] == 0.0] =  np.mean(avg_low)
  </code></pre>
  
  <p>Basically, I have a dataframe called x and I want to access the column 'Low' within that dataframe and a particular row i. If that element in the dataframe is equal to 0.0, I want to update that value to np.mean(avg_low). For some reason, when I print the entire dataframe, nothing is changed and all the values are still equal to 0.0 when they should have been updated. My concern is that I am modifying a view instead of the actual dataframe when I am using this type of chain indexing. The documentation was a bit confusing with respect to when something returns a view or not, so I wanted clarification for this specific example. Thanks.</p>