python/ray/data/dataset_pipeline.py
def sum(self) -> int:
        """Sum the records in the dataset pipeline.

        This blocks until the entire pipeline is fully executed.

        Time complexity: O(dataset size / parallelism)

        Returns:
            The sum of the records in the dataset pipeline.
        """
        if self._length == float("inf"):
            raise ValueError("Cannot sum a pipeline of infinite length.")

        pipe = self.map_batches(lambda batch: [batch.sum()[0]], batch_format="pandas")
        total = 0
        for elem in pipe.iter_rows():
            total += elem
        return total
Sum the records in the dataset pipeline.

        This blocks until the entire pipeline is fully executed.

        Time complexity: O(dataset size / parallelism)

        Returns:
            The sum of the records in the dataset pipeline.
        
Sum the records in the dataset pipeline.
This blocks until the entire pipeline is fully executed.

Time complexity: O(dataset size / parallelism)
Sum the records in the dataset pipeline . This blocks until the entire pipeline is fully executed . Time complexity : O ( dataset size / parallelism )
def sum(self) -> int:
        if self._length == float("inf"):
            raise ValueError("Cannot sum a pipeline of infinite length.")
        pipe = self.map_batches(lambda batch: [batch.sum()[0]], batch_format="pandas")
        total = 0
        for elem in pipe.iter_rows():
            total += elem
        return total
def sum ( self ) -> int : if self . _length == float ( "inf" ) : raise ValueError ( "Cannot sum a pipeline of infinite length." ) pipe = self . map_batches ( lambda batch : [ batch . sum ( ) [ 0 ] ] , batch_format = "pandas" ) total = 0 for elem in pipe . iter_rows ( ) : total += elem return total
Sum the records in the dataset pipeline.
Sum the records in the dataset pipeline .
"""Sum the records in the dataset pipeline.

        This blocks until the entire pipeline is fully executed.

        Time complexity: O(dataset size / parallelism)

        Returns:
            The sum of the records in the dataset pipeline.
        """
The sum of the records in the dataset pipeline.
The sum of the records in the dataset pipeline .
self