title: Pandas - replacing column values
body: <p>I know there are a number of topics on this question, but none of the methods worked for me so I'm posting about my specific situation</p>
  
  <p>I have a dataframe that looks like this:</p>
  
  <pre><code>data = pd.DataFrame([[1,0],[0,1],[1,0],[0,1]], columns=["sex", "split"])
  data['sex'].replace(0, 'Female')
  data['sex'].replace(1, 'Male')
  data
  </code></pre>
  
  <p>What I want to do is replace all 0's in the sex column with 'Female', and all 1's with 'Male', but the values within the dataframe don't seem to change when I use the code above</p>
  
  <p>Am I using replace() incorrectly? Or is there a better way to do conditional replacement of values?</p>