79432881

Date: 2025-02-12 11:29:40
Score: 3
Natty:
Report link

column = "Keywords"

df = df.withColumn(f"{column}", F.regexp_replace(f"{column}", r"^'|'$", ""))

This regex r"^'|'$" will replace the starting and ending single quotes

Reasons:
  • Low length (1):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Ann Marie