For spark in python, do the sc.parallelize() and collect() operations preserve order?
For example if I have a list of elements x, will sc.parallelize(x).collect() return a list of elements in the exact same order as x?
Both parallelize and collect preserve order. Most of the methods in Spark don't.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With