I am trying improve the accuracy of Logistic regression algorithm implemented in Spark using Java. For this I\'m trying to replace Null or invalid values present in a column
You can use DataFrame.na.fill() to replace the null with some value
To update at once you can do as
val map = Map("Name" -> "a", "Place" -> "a2")
df.na.fill(map).show()
But if you want to replace a bad record too then you need to validate the bad records first. You can do this by using regular expression with like function.