Skip to main content

draw

Function draw 

Source
pub fn draw(
    lf: &LazyFrame,
    sample: &Sample,
    known_total: Option<usize>,
    path: Option<DrawPath>,
    polars_streaming: bool,
    live: &Live,
) -> Result<Drawn>
Expand description

Draw sample from lf, already cut to its scope, into live’s chunks.

known_total is the scope’s row count when the table knows it: it saves a count before seeded runs, and picks a Bernoulli sample of a stream over a reservoir, unless path says which, as a redraw or a view does: the same rows again.