Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6908#discussion_r32864207
  
    --- Diff: python/pyspark/sql/column.py ---
    @@ -326,6 +326,27 @@ def between(self, lowerBound, upperBound):
             """
             return (self >= lowerBound) & (self <= upperBound)
     
    +    @since(1.5)
    +    def In(self, *values):
    +        """
    +        A boolean expression that is evaluated to true if the value of this
    +        expression is any of the given columns.
    +        NOTE: Normally, we shold name this function the small case `in`. 
However, `in` is
    +        a reserved word in Python. So we can't help naming this the upper 
case `In`.
    +
    +        >>> df.select(df.name, df.age, df.age.In(2, 4)).show()
    +        +-----+---+---------+
    +        | name|age|(age = 2)|
    +        +-----+---+---------+
    +        |Alice|  2|     true|
    +        |  Bob|  5|    false|
    +        +-----+---+---------+
    +        """
    +        for v in values:
    --- End diff --
    
    This approach will not scale if you have many values, please call the java 
API  `in`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to