ray.data.datasource.CSVDatasource#

class ray.data.datasource.CSVDatasource(*args, **kwds)[source]#

Bases: ray.data.datasource.file_based_datasource.FileBasedDatasource

CSV datasource, for reading and writing CSV files.

Examples

>>> import ray
>>> from ray.data.datasource import CSVDatasource
>>> source = CSVDatasource() 
>>> ray.data.read_datasource( 
...     source, paths="/path/to/dir").take()
[{"a": 1, "b": "foo"}, ...]

PublicAPI: This API is stable across Ray releases.