| [ Web Proxy ] |
| Viewing: https://spark.apache.org/docs/latest/api/python/reference/api/../api/pyspark.RDD.intersection.html | [Back] [Original] |
Site Navigation
Site Navigation
Section Navigation
Return the intersection of this RDD and another one. The output will not contain any duplicate elements, even if the input RDDs did.
New in version 1.0.0.
See also
Notes
This method performs a shuffle internally.
Examples
>>> rdd1 = sc.parallelize([1, 10, 2, 3, 4, 5])
>>> rdd2 = sc.parallelize([1, 6, 2, 3, 7, 8])
>>> rdd1.intersection(rdd2).collect()
[1, 2, 3]
Copyright @ 2026 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
Created using Sphinx 4.5.0.
Built with the PyData Sphinx Theme 0.13.3.
| Web Proxy Viewer | New URL | Original Page |