I'm currently working with Pyspark and I'm facing a seemingly simple problem.
I want to capitalize the first letter of each word, even if the words are separated by characters in the following list:
delimiter_list = [' ', '(', '+', '/', '-']
Actually, initcap works only for words delimited by blank types.
Is there an efficient solution? Here are some input-output examples:
| input | output |
|---|---|
| baden-baden | Baden-Baden |
| markranstadt/brandenburg-kirchmöser | Markranstadt/Brandenburg-Kirchmöser |
| ostrow mazowiecki/bialystok | Ostrow Mazowiecki/Bialystok |