mlx.data.Stream.csv_reader_from_key#
- Stream.csv_reader_from_key(self: mlx.data._c.Stream, key: str, sep: str = ', ', quote: str = '"', from_memory: bool = False, local_prefix: os.PathLike = '', file_fetcher: mlx::data::core::FileFetcher = None) mlx.data._c.Stream #
Read the csv file pointed to from the array at
key
and yield the contents as separate samples in the stream.This operation is similar to
stream_csv_reader()
but applied once for every sample in the stream and the samples from the resulting stream are returned until exhaustion.- Parameters:
key (str) – The sample key that contains the array we are operating on.
sep (str) – The field separator in the csv file. (default: ‘,’)
quote (str) – The quotation character in the csv file. (default: ‘”’)
from_memory (bool) – Read the csv from the contents of the array rather than treating the array as a filename. (default: False)
local_prefix (str) – The filepath prefix to use to read the files. (default: ‘’)
file_fetcher (mlx.data.core.FileFetcher, optional) – A file fetcher to read the csv files possibly from a remote location.