Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python saveAsTextFile

samples = sc.parallelize([
    ("abonsanto@fakemail.com", "Alberto", "Bonsanto"),
    ("mbonsanto@fakemail.com", "Miguel", "Bonsanto"),
    ("stranger@fakemail.com", "Stranger", "Weirdo"),
    ("dbonsanto@fakemail.com", "Dakota", "Bonsanto")
])

print samples.collect()

samples.saveAsTextFile("folder/here.txt")
read_rdd = sc.textFile("folder/here.txt")

read_rdd.collect()
Comment

PREVIOUS NEXT
Code Example
Python :: dataframe x y to geodataframe 
Python :: how to make any player hit a ball using python turtle 
Python :: python json indented 
Python :: Python, pytorch math square 
Python :: do you have to qualift for mosp twice? 
Python :: how to use datetime to tell your age in python 
Python :: python open file same folder 
Python :: python print time difference 
Python :: django email settings 
Python :: python integer validation 
Python :: django template iterate dict 
Python :: django login redirect 
Python :: what is r strip function in python 
Python :: how to add card in py-trello 
Python :: phi 
Python :: where to find python interpreter 
Python :: plotly scatter markers size 
Python :: how to get the amount of nan values in a data fram 
Python :: extract n grams from text python 
Python :: check all python versions ubuntu 
Python :: how to merge dataframe with different keys 
Python :: pandas groupby aggregate quantile 
Python :: python get all methods of object 
Python :: remove jupyter environment 
Python :: django populate choice field from database 
Python :: how to print dataframe in python without index 
Python :: how to move a column to last in pandas 
Python :: python for loop with array 
Python :: what is a good python version today 
Python :: check dictionary is empty or not in python 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =