python saveastextfile

Solutions on MaxInterview for python saveastextfile by the best coders in the world

showing results for - "python saveastextfile"
Andrea
08 Nov 2017
1samples = sc.parallelize([
2    ("abonsanto@fakemail.com", "Alberto", "Bonsanto"),
3    ("mbonsanto@fakemail.com", "Miguel", "Bonsanto"),
4    ("stranger@fakemail.com", "Stranger", "Weirdo"),
5    ("dbonsanto@fakemail.com", "Dakota", "Bonsanto")
6])
7
8print samples.collect()
9
10samples.saveAsTextFile("folder/here.txt")
11read_rdd = sc.textFile("folder/here.txt")
12
13read_rdd.collect()