veloxx 0.4.0

Veloxx: High-performance, lightweight Rust library for in-memory data processing and analytics. Features DataFrames, Series, advanced I/O (CSV, JSON, Parquet), machine learning (linear regression, K-means, logistic regression), time-series analysis, data visualization, parallel processing, and multi-platform bindings (Python, WebAssembly). Designed for minimal dependencies, optimal memory usage, and blazing speed - ideal for data science, analytics, and performance-critical applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14

use crate::series::Series;
use crate::VeloxxError;

impl Series {
    pub fn str_contains(&self, pat: &str) -> Result<Series, VeloxxError> {
        if let Series::String(name, data) = self {
            let new_data = data.iter().map(|opt| opt.as_ref().map(|s| s.contains(pat))).collect();
            Ok(Series::Bool(name.clone(), new_data))
        } else {
            Err(VeloxxError::invalid_operation("str_contains can only be used on a String series"))
        }
    }
}