pub struct Series { /* private fields */ }Expand description
Series - represents a single column of data
Implementations§
Source§impl Series
impl Series
Sourcepub fn from_vec(data: Vec<XdlValue>) -> DataFrameResult<Self>
pub fn from_vec(data: Vec<XdlValue>) -> DataFrameResult<Self>
Create a new Series from a vector
Sourcepub fn get(&self, index: usize) -> DataFrameResult<&XdlValue>
pub fn get(&self, index: usize) -> DataFrameResult<&XdlValue>
Get value at index
Sourcepub fn head(&self, n: usize) -> DataFrameResult<Self>
pub fn head(&self, n: usize) -> DataFrameResult<Self>
Head - get first n elements
Sourcepub fn tail(&self, n: usize) -> DataFrameResult<Self>
pub fn tail(&self, n: usize) -> DataFrameResult<Self>
Tail - get last n elements
Sourcepub fn describe(&self) -> DataFrameResult<HashMap<String, f64>>
pub fn describe(&self) -> DataFrameResult<HashMap<String, f64>>
Describe - get statistical summary for numeric series
Sourcepub fn sum(&self) -> DataFrameResult<f64>
pub fn sum(&self) -> DataFrameResult<f64>
Sum of numeric values
Sourcepub fn mean(&self) -> DataFrameResult<f64>
pub fn mean(&self) -> DataFrameResult<f64>
Mean of numeric values
Sourcepub fn value_counts(&self) -> HashMap<String, usize>
pub fn value_counts(&self) -> HashMap<String, usize>
Value counts - return counts of unique values
Sourcepub fn map<F>(&self, f: F) -> DataFrameResult<Self>
pub fn map<F>(&self, f: F) -> DataFrameResult<Self>
Apply a function to each element
Sourcepub fn filter<F>(&self, predicate: F) -> DataFrameResult<Self>
pub fn filter<F>(&self, predicate: F) -> DataFrameResult<Self>
Filter elements based on predicate
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Series
impl RefUnwindSafe for Series
impl Send for Series
impl Sync for Series
impl Unpin for Series
impl UnwindSafe for Series
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
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