pub struct TextStats {
pub min_length: usize,
pub max_length: usize,
pub avg_length: f64,
pub most_frequent: Option<Vec<FrequencyItem>>,
pub least_frequent: Option<Vec<FrequencyItem>>,
}Expand description
Statistics for text/string columns.
Every length here is a count of Unicode scalar values, not UTF-8 bytes and
not grapheme clusters. ASCII text is unaffected by that distinction; a
combining sequence counts each scalar, so the decomposed and precomposed
spellings of the same word report different lengths. The text_units module
carries the reasoning.
Fields§
§min_length: usizeShortest value, in Unicode scalar values.
max_length: usizeLongest value, in Unicode scalar values.
avg_length: f64Mean length in Unicode scalar values. A mean, so it rounds at the statistics precision rather than the percentage one.
most_frequent: Option<Vec<FrequencyItem>>§least_frequent: Option<Vec<FrequencyItem>>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextStats
impl<'de> Deserialize<'de> for TextStats
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for TextStats
impl JsonSchema for TextStats
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for TextStats
impl RefUnwindSafe for TextStats
impl Send for TextStats
impl Sync for TextStats
impl Unpin for TextStats
impl UnsafeUnpin for TextStats
impl UnwindSafe for TextStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more