title: Filter Spark dataframe by checking if value is in the list of particular column or not in python?
body: <p>I have spark df as follows:</p>
  <pre><code>Name country
  A     [&quot;GB&quot;,&quot;USA&quot;,&quot;IN&quot;]
  B     [&quot;GB&quot;,&quot;RU&quot;]
  C     [&quot;IN&quot;,&quot;BN&quot;]
  D     [&quot;GB&quot;]
  </code></pre>
  <p>I am trying to filter this spark df with <code>&quot;GB&quot;</code>. Output should be like that:</p>
  <pre><code>Name country
  A     [&quot;GB&quot;,&quot;USA&quot;,&quot;IN&quot;]
  B     [&quot;GB&quot;,&quot;RU&quot;]
  D     [&quot;GB&quot;]
  </code></pre>