title: Replace all inf, -inf values with NaN in a pandas dataframe
body: <p>I have a large dataframe with inf, -inf values in different columns. I want to replace all inf, -inf values with NaN</p>
  <p>I can do so column by column. So this works:</p>
  <pre><code>df['column name'] = df['column name'].replace(np.inf, np.nan)
  </code></pre>
  <p>But my code to do so in one go across the dataframe does not.</p>
  <pre><code>df.replace([np.inf, -np.inf], np.nan)
  </code></pre>
  <p>The output does not replace the inf values</p>