Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-36003

Implement unary operator `invert` of integral ps.Series/Index

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.2.0
    • PySpark
    • None

    Description

       

      >>> ~ps.Series([1, 2, 3])
      Traceback (most recent call last):
      ...
      pyspark.sql.utils.AnalysisException: cannot resolve '(NOT `0`)' due to data type mismatch: argument 1 requires boolean type, however, '`0`' is of bigint type.;
      'Project [unresolvedalias(NOT 0#1L, Some(org.apache.spark.sql.Column$$Lambda$1365/2097273578@53165e1))]
      +- Project [__index_level_0__#0L, 0#1L, monotonically_increasing_id() AS __natural_order__#4L]
       +- LogicalRDD [__index_level_0__#0L, 0#1L], false
      

       

       Currently, unary operator `invert` of integral ps.Series/Index is not supported. We ought to implement that following pandas' behaviors.

      Attachments

        Issue Links

          Activity

            People

              XinrongM Xinrong Meng
              XinrongM Xinrong Meng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: