torchdata/datapipes/iter/util/plain_text_reader.py [147:175]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    r"""
    Iterable DataPipe that accepts a DataPipe consists of tuples of file name and CSV data stream.
    This reads and returns the contents within the CSV files one row at a time (as a List
    by default, depending on fmtparams).

    Args:
        source_datapipe: source DataPipe with tuples of file name and CSV data stream
        skip_lines: number of lines to skip at the beginning of each file
        strip_newline: if True, the new line character will be stripped
        decode: if True, this will decode the contents of the file based on the specified encoding
        encoding: the character encoding of the files (default='utf-8')
        errors: the error handling scheme used while decoding
        return_path: if True, each line will return a tuple of path and contents, rather
            than just the contents
    """

    def __init__(
        self,
        source_datapipe: IterDataPipe[Tuple[str, IO]],
        *,
        skip_lines: int = 0,
        decode: bool = True,
        encoding: str = "utf-8",
        errors: str = "ignore",
        return_path: bool = False,
        **fmtparams,
    ) -> None:
        super().__init__(
            source_datapipe,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



torchdata/datapipes/iter/util/plain_text_reader.py [188:218]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    r"""
    Iterable DataPipe that accepts a DataPipe consists of tuples of file name and CSV data stream.
    This reads and returns the contents within the CSV files one row at a time (as a Dict by default,
    depending on fmtparams).
    The first row of each file, unless skipped, will be used as the header; the contents of the header row
    will be used as keys for the Dicts generated from the remaining rows.

    Args:
        source_datapipe: source DataPipe with tuples of file name and CSV data stream
        skip_lines: number of lines to skip at the beginning of each file
        strip_newline: if True, the new line character will be stripped
        decode: if True, this will decode the contents of the file based on the specified encoding
        encoding: the character encoding of the files (default='utf-8')
        errors: the error handling scheme used while decoding
        return_path: if True, each line will return a tuple of path and contents, rather
            than just the contents
    """

    def __init__(
        self,
        source_datapipe: IterDataPipe[Tuple[str, IO]],
        *,
        skip_lines: int = 0,
        decode: bool = True,
        encoding: str = "utf-8",
        errors: str = "ignore",
        return_path: bool = False,
        **fmtparams,
    ) -> None:
        super().__init__(
            source_datapipe,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



