title: How to use functions provide by DataFrameNaFunctions class in Spark, on a Dataframe?
body: <p>I have a dataframe and I want to use one of the <strong>replace()</strong> function of <strong><code>
  org.apache.spark.sql.DataFrameNaFunctions</code></strong> on that dataframe.</p>
  
  <p><strong>Problem:</strong> I don't get these methods in intelligence (suggestions) with dataframe's instance. I imported that class explicitly. </p>
  
  <p>I am not able to find any stuff which can give me some demonstration of how to use these functions or how to cast dataframe to type of <code>DataFrameNaFunctions</code>.</p>
  
  <p>I tried to cast it using <code>asInstanceof[]</code> method but it throws exception.</p>