Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-2992 The transforms formerly known as non-lazy
  3. SPARK-2315

drop, dropRight and dropWhile which take RDD input and return RDD

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Spark Core

    Description

      Last time I loaded in a text file, I found myself wanting to just skip the first element as it was a header. I wrote candidate methods drop, dropRight and dropWhile to satisfy this kind of need:

      val txt = sc.textFile("text_with_header.txt")
      val data = txt.drop(1)

      Attachments

        Issue Links

          Activity

            People

              eje Erik Erlandson
              eje Erik Erlandson
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: