pub struct DataFrameAnalyzer { /* private fields */ }Implementations§
Source§impl DataFrameAnalyzer
impl DataFrameAnalyzer
pub fn new(df: DataFrame) -> Self
pub fn get_dataframe(&self) -> &DataFrame
pub fn get_descriptive_statistics(&self) -> Result<DataFrame>
pub fn get_value_counts(&self, column_name: &str) -> Result<DataFrame>
pub fn get_null_counts(&self) -> Result<DataFrame>
pub fn get_histogram(&self, column_name: &str, bins: usize) -> Result<DataFrame>
pub fn rank_by_column(&self, column_name: &str) -> Result<DataFrame>
pub fn detect_anomalies( &self, column_name: &str, threshold: f64, ) -> Result<(DataFrame, usize)>
pub fn perform_kmeans_clustering( &self, column_names: &[&str], k: usize, max_iterations: usize, ) -> Result<DataFrame>
Sourcepub fn group_and_aggregate(
&self,
group_by_column: &str,
aggregations: &[(&str, &str)],
) -> Result<DataFrame>
pub fn group_and_aggregate( &self, group_by_column: &str, aggregations: &[(&str, &str)], ) -> Result<DataFrame>
Performs a group-by operation followed by aggregation on specified columns.
§Arguments
group_by_column- The name of the column to group the DataFrame by.aggregations- A slice of tuples, where each tuple contains:- The name of the column to aggregate.
- The type of aggregation to perform (“sum”, “mean”, “min”, “max”, “count”).
§Returns
A Result containing the aggregated DataFrame or an anyhow::Error if the operation fails.
§Errors
Returns an error if the specified columns are not found or if an unsupported aggregation type is provided.
pub fn get_correlation_matrix(&self, column_names: &[&str]) -> Result<DataFrame>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DataFrameAnalyzer
impl !RefUnwindSafe for DataFrameAnalyzer
impl Send for DataFrameAnalyzer
impl Sync for DataFrameAnalyzer
impl Unpin for DataFrameAnalyzer
impl !UnwindSafe for DataFrameAnalyzer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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