title: How to replace value in column of dataframe?
body: <p>anyone can guide me about python code for the replacement of the value of the data frame to some specified value. I have tried the dataframe.replace() method</p>
  
  <pre><code>data.replace(to_replace=['A','B','C' ], value=[2, 3, 4])
  </code></pre>
  
  <p>It works fine..</p>
  
  <p>But when I tried with the collection it does not work with no effect on the dataframe.</p>
  
  <pre><code>d = [{'A': 2, 'B': 3, 'C': 4}]; # d is dictionary     
  for key, val in d.items():
          data.replace(to_replace=[val] , value=[key])
  </code></pre>
  
  <p>Anyone can help me that why this is not working?</p>