python/pyspark/rdd.py
def zip(self, other):
        """
        Zips this RDD with another one, returning key-value pairs with the first element in each RDD
        second element in each RDD, etc. Assumes that the two RDDs have the same number of
        partitions and the same number of elements in each partition (e.g. one was made through
        a map on the other).

        >>> x = sc.parallelize(range(0,5))
        >>> y = sc.parallelize(range(1000, 1005))
        >>> x.zip(y).collect()
        [(0, 1000), (1, 1001), (2, 1002), (3, 1003), (4, 1004)]
        """
        pairRDD = self._jrdd.zip(other._jrdd)
        deserializer = PairDeserializer(self._jrdd_deserializer,
                                             other._jrdd_deserializer)
        return RDD(pairRDD, self.ctx, deserializer)

        Zips this RDD with another one, returning key-value pairs with the first element in each RDD
        second element in each RDD, etc. Assumes that the two RDDs have the same number of
        partitions and the same number of elements in each partition (e.g. one was made through
        a map on the other).

        >>> x = sc.parallelize(range(0,5))
        >>> y = sc.parallelize(range(1000, 1005))
        >>> x.zip(y).collect()
        [(0, 1000), (1, 1001), (2, 1002), (3, 1003), (4, 1004)]
        
Zips this RDD with another one, returning key-value pairs with the first element in each RDD
second element in each RDD, etc. Assumes that the two RDDs have the same number of
partitions and the same number of elements in each partition .


Zips this RDD with another one returning key - value pairs with the first element in each RDD second element in each RDD etc . Assumes that the two RDDs have the same number of partitions and the same number of elements in each partition .
def zip(self, other):
        pairRDD = self._jrdd.zip(other._jrdd)
        deserializer = PairDeserializer(self._jrdd_deserializer,
                                             other._jrdd_deserializer)
        return RDD(pairRDD, self.ctx, deserializer)
def zip ( self , other ) : pairRDD = self . _jrdd . zip ( other . _jrdd ) deserializer = PairDeserializer ( self . _jrdd_deserializer , other . _jrdd_deserializer ) return RDD ( pairRDD , self . ctx , deserializer )
Zips this RDD with another one, returning key-value pairs with the first element in each RDD
second element in each RDD, etc.
Zips this RDD with another one returning key - value pairs with the first element in each RDD second element in each RDD etc .
"""
        Zips this RDD with another one, returning key-value pairs with the first element in each RDD
        second element in each RDD, etc. Assumes that the two RDDs have the same number of
        partitions and the same number of elements in each partition (e.g. one was made through
        a map on the other).

        >>> x = sc.parallelize(range(0,5))
        >>> y = sc.parallelize(range(1000, 1005))
        >>> x.zip(y).collect()
        [(0, 1000), (1, 1001), (2, 1002), (3, 1003), (4, 1004)]
        """
self
other