title: value subtract is not a member of org.apache.spark.sql.DataFrame in Spark Scala
body: <p>In Spark Scala while trying to use subtract method, I get the following error</p>
  
  <pre class="lang-none prettyprint-override"><code>&lt;console&gt;:29: error: value subtract is not a member of org.apache.spark.sql.DataFrame
  </code></pre>
  
  <p>But from the following links I can see it is present in Python though</p>
  
  <p><a href="https://forums.databricks.com/questions/7505/comparing-two-dataframes.html" rel="nofollow noreferrer">https://forums.databricks.com/questions/7505/comparing-two-dataframes.html</a>
  <a href="https://spark.apache.org/docs/1.3.0/api/python/pyspark.sql.html?highlight=dataframe#pyspark.sql.DataFrame.subtract" rel="nofollow noreferrer">https://spark.apache.org/docs/1.3.0/api/python/pyspark.sql.html?highlight=dataframe#pyspark.sql.DataFrame.subtract</a></p>
  
  <p>Do we have subtract method at all in of Spark Scala? If not what is the replacement for it?</p>
  
  <p>My sample code looks like this:</p>
  
  <pre class="lang-scala prettyprint-override"><code>scala&gt; val myDf1 = sc.parallelize(Seq(1,2,2)).toDF
  myDf1: org.apache.spark.sql.DataFrame = [value: int]
  
  scala&gt; val myDf2 = sc.parallelize(Seq(1,2)).toDF
  myDf2: org.apache.spark.sql.DataFrame = [value: int]
  
  scala&gt; val result = myDf1.subtract(myDf2)
  &lt;console&gt;:28: error: value subtract is not a member of org.apache.spark.sql.DataFrame
         val result = myDf1.subtract(myDf2)
  </code></pre>