def __getitem__ ( self , key ) : return self . from_rdd ( self . _rdd . map ( lambda x : x [ key ] ) )
rdd custom reducebykey function python
Returns a new PRDD of elements from that key .
def __getitem__(self, key):
        """Returns a new PRDD of elements from that key."""
        return self.from_rdd(self._rdd.map(lambda x: x[key]))