I'm trying run a Regex in Python on a dataframe in Apache Spark.
The df is
The regex is as follows:
import re
m = re.search("[Pp]ython", df)
print(m)
I'm getting the following error message:
TypeError: expected string or bytes-like object
The following will work
import re m = re.search("[Pp]ython", 'Python python') print(m)
But I would like the regex to work on a dataframe
