I am trying to make a new column by replacing certain strings.
df = df.withColumn('new_key_location', F.regexp_replace('key_location'), ^'Seoul|Jeju|Busan', 'Others')
I want to change other location names in the key_location column not containing 'Seoul|Jeju|Busan' strings to 'Others'.
What can I do?