title: Converting SCALA === (triple equal) to Python for SPARK column
body: <p>I have a following code in Scala for Python conversion</p>
  <pre><code>
  import org.apache.spark.sql.functions.{col, lit}
  import org.apache.spark.sql.{Column, DataFrame, Dataset}
  
  object SearchTermReader {
  
    def read(
      searchTermsInputTable: DataFrame,
      brand: String,
      posa: String,
      startDate: String,
      endDate: String
    ): Dataset[SearchTerm] = {
  
      import searchTermsInputTable.sparkSession.implicits._
  
      val conditionsNoEndDate = getConditions(brand, posa, startDate)
      val searchTermsNoEndDate = searchTermsInputTable
        .where(conditionsNoEndDate)
        .cache()
  
      searchTermsNoEndDate.count()
  
      val columnNames = SparkExtensions.getColumns[SearchTerm]
  
      searchTermsNoEndDate
        .filter(col(&quot;report_date&quot;).leq(lit(endDate)))
        .select(columnNames: _*)
        .as[SearchTerm]
    }
  
    def getConditions(
      brand: String,
      posa: String,
      startDate: String
    ): Column = {
  
      val filterByBrandCondition: Column = {
        if (brand.equals(&quot;&quot;)) {
          lit(true)
        } else {
          col(&quot;brand&quot;) === brand
        }
      }
      val filterByPosaCondition: Column = {
        if (posa.equals(&quot;&quot;)) {
          lit(true)
        } else {
          col(&quot;account_name&quot;).rlike(getAccountPattern(posa))
        }
      }
  
      filterByBrandCondition &amp;&amp;
        filterByPosaCondition &amp;&amp;
        col(&quot;search_engine&quot;) === &quot;GOOGLE&quot; &amp;&amp;
        col(&quot;impressions&quot;) &gt; 0 &amp;&amp;
        col(&quot;report_date&quot;).geq(lit(startDate))
    }
  
    def getAccountPattern(countryCodes: String): String = {
      countryCodes.split(&quot;,&quot;).map(cc =&gt; s&quot;:G:$cc:&quot;).mkString(&quot;|&quot;)
    }
  }
  
  </code></pre>
  <p>Seems to be two issues here for straight conversion.</p>
  <ol>
  <li>Dataset is used which is not supported by Pyspark</li>
  <li>=== is used for Column which is also not supported</li>
  </ol>
  <p>How I can overcome this and convert it to Python ??</p>