I've the following tranformation:
rdd1.map(lambda line: line[3]).countByValue()
How I can I store this in order to save the result as TextFile?
Because if I try to use:
rdd1.map(lambda line: line[3]).countByValue().saveAsTextFile("directory.txt")
However, the saveAsTextFile
is not a part of collections. How can I do this?