Skip to content

sample

Samples of rows shown in the report.

Classes

Sample

Bases: BaseModel

A sample of rows.

Attributes: id: head, tail, random or custom. data: the rows, as a pl.DataFrame. name: title shown in the report. caption: optional caption. index: position of each row in the profiled frame, when known.

Functions:

get_sample(config, df, n_rows)

First, last and random rows (samples.head, .tail, .random).

All samples are taken in one collect_all; on a LazyFrame only the needed rows are materialised.