I need to extract the integers only from url stings in the column "Page URL" and append those extracted integers to a new column. I am using PySpark. My code below:
from pyspark.sql.functions import col, regexp_extract
spark_df_url.withColumn("new_column", regexp_extract(col("Page URL"), "\d+", 1).show())
I have the following error: TypeError: 'Column' object is not callable.