I have a pd.DataFrame
with multiple columns and one column has url extracted from web e.g.:
url = "http://www.currys.co.uk/gbuk/s/10153572/product_confirmation.html"
I have used regular expressions to extract the product code as below
re.findall('\d+', url)
However, if I try and replicate to the entire dataset ( which has multiple columns) I get an error
regex = lambda x: x.re.findall('\d+')
df["new_column"] = df['url'].apply(regex)
'str' object has no attribute 're' .