I have a dataframe column containing url encoded string such as:
I would like to do something like that:
someDF.withColumn('newcol', URLDecoder.decode( col("mystring"), "utf-8" ))
someDF.show()
| mystring | newcol |
--------------------------------------------------
| ThisIs%201rstString | ThisIs 1rstString |
| This%20is%3Ethisone | This is>thisone |
| and%20so%20one | and so one |
How should I do such thing I guess map function is around the corner but can't firgure out how to us it.
Note: this is a sample and it is not an option to create multiple replace statement as there is many other encoded characters and list may vary, I'd like to use a simple reliable method to do so.