Spark fillNa not replacing the null value
<p>I have the following dataset and its contain some null values, need to replace the null value using fillna in spark.</p>

<p>DataFrame:</p>

<pre><code>df = spark.read.format("com.databricks.spark.csv").option("header‌​","true").load("/sam‌​ple.csv")

&gt;&gt;&gt; df.printSchema();
root
 |-- Age: string (nullable = true)
 |-- Height: string (nullable = true)
 |-- Name: string (nullable = true)

&gt;&gt;&gt; df.show()
+---+------+-----+
|Age|Height| Name|
+---+------+-----+
| 10|    80|Alice|
|  5|  null|  Bob|
| 50|  null|  Tom|
| 50|  null| null|
+---+------+-----+

&gt;&gt;&gt; df.na.fill(10).show()
</code></pre>

<p>when i'll  give the na values it dosen't changed the same dataframe appeared again.</p>

<pre><code>+---+------+-----+
|Age|Height| Name|
+---+------+-----+
| 10|    80|Alice|
|  5|  null|  Bob|
| 50|  null|  Tom|
| 50|  null| null|
+---+------+-----+
</code></pre>

<p>tried create a new dataframe and store the fill values in dataframe but the result showing like unchanged.</p>

<pre><code>&gt;&gt;&gt; df2 = df.na.fill(10)
</code></pre>

<p>how to replace the null values? please give me the possible ways by using fill na.
Thanks in Advance.</p>