Filtering with Scala and Apache Spark
<p>I have created a unlabeled Dataset which has some columns. The values in one of the Column are France,Germany,France and UK</p>

<p>I know how to filter and count using below code.</p>

<pre><code>val b =data.filter(_.contains("France")).count
</code></pre>

<p>However, I am not sure how to count values other than France.</p>

<p>I tried below code but it is giving me wrong result</p>

<pre><code>val a =data.filter(x=&gt;x!="France").count
</code></pre>

<p>PS: My question is a bit similar to <a href="https://stackoverflow.com/questions/33608526/is-there-a-way-to-filter-a-field-not-containing-something-in-a-spark-dataframe-u">Is there a way to filter a field not containing something in a spark dataframe using scala?</a> but I am looking for some simpler answer.</p>