title: How to replace infinity in PySpark DataFrame
body: <p>It seems like there is no support for replacing infinity values. I tried the code below and it doesn't work. Or am I missing out something?</p>
  
  <pre><code>a=sqlContext.createDataFrame([(None, None), (1, np.inf), (None, 2)])
  a.replace(np.inf, 10)
  </code></pre>
  
  <p>Or do I have to take the painful route: convert PySpark DataFrame into pandas DataFrame, replace infinity values, and convert it back to PySpark DataFrame</p>