pub struct Profile {
pub name: Option<String>,
/* private fields */
}Expand description
A profile of rows. See the module docs.
Fields§
§name: Option<String>What was profiled (a file name), for the heading.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn from_source(
source: impl RowSource,
options: ProfileOptions,
) -> Result<Self, DataError>
pub fn from_source( source: impl RowSource, options: ProfileOptions, ) -> Result<Self, DataError>
Profile every row of source, stopping at the first that cannot be
read.
Sourcepub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
Name what was profiled, for the heading.
Sourcepub fn note(&mut self, note: impl Into<String>)
pub fn note(&mut self, note: impl Into<String>)
Add a note shown under the heading (rows cut to fit, keys seen late).
Sourcepub fn sample_size(&self) -> usize
pub fn sample_size(&self) -> usize
The rows the types, statistics and distributions describe.
Sourcepub fn columns(&self) -> &[ColumnProfile]
pub fn columns(&self) -> &[ColumnProfile]
One entry per column, in order.
Sourcepub fn column(&self, name: &str) -> Option<&ColumnProfile>
pub fn column(&self, name: &str) -> Option<&ColumnProfile>
The column called name.
Sourcepub fn missing(&self) -> &MissingMap
pub fn missing(&self) -> &MissingMap
Where the nulls are.
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The profile as JSON: rows, sample, sampled, columns,
missing, and name and notes when set.
Sourcepub fn heading(&self) -> String
pub fn heading(&self) -> String
The heading: the name, the rows (and the sample, when smaller) and the columns.
Sourcepub fn to_table(&self) -> Table
pub fn to_table(&self) -> Table
The table of columns: type, nulls, distinct, min, max and mean (the median and quartiles are in the model and under each numeric column’s heading).
Sourcepub fn missing_heatmap(&self) -> Option<Heatmap>
pub fn missing_heatmap(&self) -> Option<Heatmap>
The missing-value map as a heatmap: a row per bucket, a column per
column, each cell the percentage of the bucket’s cells that are null.
None when nothing is null.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Profile
impl<'de> Deserialize<'de> for Profile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Renderable for Profile
impl Renderable for Profile
Source§fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
As wide as its widest line at the width given.
fn rich_render( &self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment>
Source§fn fit_to_measurement(&self) -> bool
fn fit_to_measurement(&self) -> bool
Console::print shrinks this renderable to its
measured width. Upstream renders every top-level renderable at the full
console width, so the default is false; an extension may opt in.