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

Add `ifelse` Column function to SparkR

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: SparkR
    • Labels:
      None

      Description

      Add a column function on a DataFrame like `ifelse` in R to SparkR.
      I guess we could implement it with a combination with when and otherwise.

      Example

      If df$x > 0 is TRUE, then return 0, otherwise return 1.

      ifelse(df$x > 0, 0, 1)
      

        Attachments

          Activity

            People

            • Assignee:
              yuu.ishikawa@gmail.com Yu Ishikawa
              Reporter:
              yuu.ishikawa@gmail.com Yu Ishikawa
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: