python/pyspark/rdd.py
def map(self, f, preservesPartitioning=False):
        """
        Return a new RDD by applying a function to each element of this RDD.
        
        >>> rdd = sc.parallelize(["b", "a", "c"])
        >>> sorted(rdd.map(lambda x: (x, 1)).collect())
        [('a', 1), ('b', 1), ('c', 1)]
        """
        def func(split, iterator): return imap(f, iterator)
        return PipelinedRDD(self, func, preservesPartitioning)

        Return a new RDD by applying a function to each element of this RDD.
        
        >>> rdd = sc.parallelize(["b", "a", "c"])
        >>> sorted(rdd.map(lambda x: (x, 1)).collect())
        [('a', 1), ('b', 1), ('c', 1)]
        
Return a new RDD by applying a function to each element of this RDD.
Return a new RDD by applying a function to each element of this RDD .
def map(self, f, preservesPartitioning=False):
        def func(split, iterator): return imap(f, iterator)
        return PipelinedRDD(self, func, preservesPartitioning)
def map ( self , f , preservesPartitioning = False ) : def func ( split , iterator ) : return imap ( f , iterator ) return PipelinedRDD ( self , func , preservesPartitioning )
Return a new RDD by applying a function to each element of this RDD.
Return a new RDD by applying a function to each element of this RDD .
"""
        Return a new RDD by applying a function to each element of this RDD.
        
        >>> rdd = sc.parallelize(["b", "a", "c"])
        >>> sorted(rdd.map(lambda x: (x, 1)).collect())
        [('a', 1), ('b', 1), ('c', 1)]
        """
self
f
preservesPartitioning