ray.data.Datasource.apply_projection#

Datasource.apply_projection(projection_map: Dict[str, str] | None) Datasource#

Apply a projection (column selection) to this datasource.

Parameters:

projection_map – Dict whose keys are the column names to select. None means select all columns. Any non-identity values are ignored — the read stage does not rename.

Returns:

A new datasource instance with the projection applied.