Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Build the union of a list of RDDs

# Build the union of a list of RDDs

path = os.path.join(tempdir, "union-text.txt")
with open(path, "w") as testFile:
  _ = testFile.write("Hello")
textFile = sc.textFile(path)
textFile.collect()
# ['Hello']
parallelized = sc.parallelize(["World!"])
sorted(sc.union([textFile, parallelized]).collect())
# ['Hello', 'World!']
Comment

PREVIOUS NEXT
Code Example
Python :: in python how to end the code after 10 input 
Python :: Applies the f function to all Row of this DataFrame 
Python :: radice n esima python 
Python :: python how to move multiple values from one list to another at once 
Python :: calling a function in python upon entry content changing tkinter 
Python :: celery subprocess 
Python :: how to xor two element in python 
Python :: assert vs validate in python 
Python :: how to pairwise permute in python 
Python :: how to acces textedit fields pyqt 
Python :: vitalik buterin age 
Python :: simplest flask memcached 
Python :: arabert 
Python :: break py 
Python :: python args description multiple lines 
Python :: tess real name from suits 
Python :: undefined variable in python 
Python :: get data from keyboard python 
Python :: Get the first item from an iterable that matches a condition 
Python :: block url selenium python 
Python :: openign in browser python 
Python :: python read text file to list 
Python :: first and last upper 
Python :: minimum ele 
Python :: scikit learn introduction 
Python :: pie chart eda syntax 
Python :: https://practice.geeksforgeeks.org/problems/coin-change2448/1 
Python :: semicircle 
Python :: if condition in python 1 
Python :: theta hat symbol python code 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =