I have a simple line:
line = "Hello, world"
I would like to convert it to an RDD with only one element. I have tried
sc.parallelize(line)
But it get:
sc.parallelize(line).collect()
['H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd']
Any ideas?
try using List as parameter:
it returns
The below code works fine in Python
Here we are passing the parameter "line" as a list.