pub struct DataFrame { /* private fields */ }Expand description
Internal columnar DataFrame for data storage and manipulation.
Implementations§
Source§impl DataFrame
impl DataFrame
Sourcepub fn column_names(&self) -> Vec<&str>
pub fn column_names(&self) -> Vec<&str>
Get column names.
Sourcepub fn has_column(&self, name: &str) -> bool
pub fn has_column(&self, name: &str) -> bool
Check if a column exists.
Sourcepub fn add_column(&mut self, name: String, values: Vec<Value>)
pub fn add_column(&mut self, name: String, values: Vec<Value>)
Add a column. Panics if length doesn’t match existing rows (unless empty).
Sourcepub fn column_mut(&mut self, name: &str) -> Option<&mut Vec<Value>>
pub fn column_mut(&mut self, name: &str) -> Option<&mut Vec<Value>>
Get a mutable reference to a column.
Sourcepub fn group_by(&self, keys: &[&str]) -> Vec<DataFrame>
pub fn group_by(&self, keys: &[&str]) -> Vec<DataFrame>
Group by one or more key columns. Returns a Vec of DataFrames, one per group.
Sourcepub fn sort_by(&self, column: &str) -> DataFrame
pub fn sort_by(&self, column: &str) -> DataFrame
Sort by a column (ascending). Returns a new DataFrame.
Sourcepub fn unique_values(&self, column: &str) -> Vec<Value>
pub fn unique_values(&self, column: &str) -> Vec<Value>
Get all unique values in a column.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataFrame
impl RefUnwindSafe for DataFrame
impl Send for DataFrame
impl Sync for DataFrame
impl Unpin for DataFrame
impl UnsafeUnpin for DataFrame
impl UnwindSafe for DataFrame
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more