As it is difficult to explain this, I would show what I want. Lets us say, I have an RDD A with the following value
A = ["word1", "word2", "word3"] I want to have an RDD with the following value B = [(1, "word1"), (2, "word2"), (3, "word3")] That is, it gives a unique number to each entry as a key value. Can we do such thing with Python or Scala?