ray.data.Datasource.apply_projection#

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

Apply a projection to this datasource.

Parameters:

projection_map – Dict mapping original column names (in storage) to final column names (after optional renames). Keys indicate which columns to select. None means select all columns with no renames.

Returns:

A new datasource instance with the projection applied.