I need to replace null values in string type columns to be 0. Data looks like this:
df.groupBy('content').count().show()
+---------------+------+
| content| count|
+---------------+------+
| videos| 754|
| food-news| 76151|
| null| 39|
| uk| 23879|
I have tried this:
df.na.fill(0).show()
But this piece of code only takes care of int type columns. How can I replace it for string type columns?
Thank you.