pub struct DataFrame<D: Clone + DeserializeOwned + Serialize> { /* private fields */ }
Expand description
A DataFrame is the main data structure of combee.
Implementations§
source§impl<D: Clone + DeserializeOwned + Serialize> DataFrame<D>
impl<D: Clone + DeserializeOwned + Serialize> DataFrame<D>
sourcepub fn take(&self, num: usize) -> Vec<D>
pub fn take(&self, num: usize) -> Vec<D>
Returns a vector with the first ‘num’ rows of this DataFrame.
sourcepub fn head(&self, num: usize) -> SliceDataFrame<'_, D>
pub fn head(&self, num: usize) -> SliceDataFrame<'_, D>
Returns a new DataFrame with the first ‘num’ rows of this DataFrame.
sourcepub fn apply<S: Clone + DeserializeOwned + Serialize, F>(
&self,
func: F
) -> DataFrame<S>where
F: Fn(&D) -> S,
pub fn apply<S: Clone + DeserializeOwned + Serialize, F>( &self, func: F ) -> DataFrame<S>where F: Fn(&D) -> S,
Apply a function for each row of a DataFrame and returns a new DataFrame.
sourcepub fn filter<F>(&self, func: F) -> Selfwhere
F: Fn(&D) -> bool,
pub fn filter<F>(&self, func: F) -> Selfwhere F: Fn(&D) -> bool,
Filter the DataFrame with the condition given by the closure parameter.
sourcepub fn sort<F>(&self, comp: F) -> Selfwhere
F: Fn(&D, &D) -> bool,
pub fn sort<F>(&self, comp: F) -> Selfwhere F: Fn(&D, &D) -> bool,
Sort the DataFrame by a comparison function and returns a new DataFrame sorted. This sorting algorithm is not stable, i.e, does not preserve the order of equal elements.
sourcepub fn groupby<F, I: Eq + Hash + Clone>(
&self,
index: F
) -> GroupedDataFrame<'_, D, I, F>where
F: Fn(&D) -> I,
pub fn groupby<F, I: Eq + Hash + Clone>( &self, index: F ) -> GroupedDataFrame<'_, D, I, F>where F: Fn(&D) -> I,
Group DataFrame by index function.
Auto Trait Implementations§
impl<D> RefUnwindSafe for DataFrame<D>where D: RefUnwindSafe,
impl<D> Send for DataFrame<D>where D: Send,
impl<D> Sync for DataFrame<D>where D: Sync,
impl<D> Unpin for DataFrame<D>where D: Unpin,
impl<D> UnwindSafe for DataFrame<D>where D: UnwindSafe,
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