更新时间:2023-11-13 22:10:40
您需要转义。
进行字面匹配,如。
是一个特殊字符,匹配正则表达式中的几乎所有字符:
You need to escape .
to match it literally, as .
is a special character that matches almost any character in regex:
df = df.withColumn('revenue', regexp_replace(col('revenue'), "\\.", ""))