I have downlaoded data from SAP and trying to do ETL. Data set looks like below.
11.780,00
13.824,00
0,00
33.024,00
I am trying to remove "dot" first and then replace "comma" with dot
The following code makes the whole column as blank (everything just vanishes) It's just a simple regex replace statement
sales = sales.withColumn('gross', regexp_replace('gross', '.', ''))
Again when I try as below
sales = sales.withColumn('gross', regexp_replace('gross', '.', ':'))
output looks like below
:::::::::::::
How do I handle this conversion. It's bit weird. Thanks.