title: Python replace 1.0 and 0.0 with True and False in dataframe
body: <p>I have a big data frame. I want to replace float 1.0 and 0.0 with true and false.</p>
  <p>My code:</p>
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({&quot;A&quot;:[1.0,0.0,1.0,0.0]})
  df.replace(1.0,True,inplace=True).replace(0.0,False,inplace=True) 
  </code></pre>
  <p>Present output:</p>
  <pre><code>AttributeError: 'NoneType' object has no attribute 'replace'
  </code></pre>
  <p>If I do it separately in two lines, it will work. I want to do it in one line.</p>