This is basically very simple. You’ll need to create a new DataFrame
. I’m using the DataFrame df
that you have defined earlier.
val newDf = df.na.fill("e",Seq("blank"))
DataFrame
s are immutable structures.
Each time you perform a transformation which you need to store, you’ll need to affect the transformed DataFrame
to a new value.