In Pyspark, one can filter an array using the following code:
lines.filter(lambda line: "some" in line)
But I have read data from a json file and tokenized it. Now it has the following form:
df=[Row(text=u"i have some text", words=[u'I', u'have', u"some'", u'text'])]
How can I filter out "some" from words array ?