Skip to main content

name_columns

Function name_columns 

Source
pub fn name_columns(
    lf: LazyFrame,
    header: Option<&[String]>,
) -> PolarsResult<LazyFrame>
Expand description

lf with its columns named as shown_names says. Nothing is read: Polars has the schema from the scan’s own inference.

With header, a file with nothing after its header lines (a log with no rows yet) is a table with those columns and no rows, as Polars reads a file that is only a header; Polars itself finds no data past the lines it skipped.