Pyspark RDD .filter() with wildcard
<p>I have an Pyspark RDD with a text column  that I want to use as a a filter, so I have the following code:</p>

<pre><code>table2 = table1.filter(lambda x: x[12] == "*TEXT*")
</code></pre>

<p>To problem is... As you see I'm using the <code>*</code> to try to tell him to interpret that as a wildcard, but no success.
Anyone has a help no that ?</p>

<pre><code>table2 = table1.filter(lambda x: "TEXT" in x[12])
</code></pre>

python apache-spark rdd