use crate::dtype::DataType;
use crate::series::core::Series;
use crate::error::AxionResult;
use std::any::Any;
use std::fmt::{Debug, Display};
use std::cmp::Ordering;
pub trait SeriesTrait: Display + Debug + Send + Sync + Any {
fn name(&self) -> &str;
fn dtype(&self) -> DataType;
fn len(&self) -> usize;
fn is_empty(&self) -> bool {
self.len() == 0
}
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn clone_box(&self) -> Box<dyn SeriesTrait>;
fn get_str(&self, index: usize) -> Option<String>;
fn is_null_at(&self, index: usize) -> bool;
fn slice(&self, start: usize, end: usize) -> Box<dyn SeriesTrait>;
fn filter(&self, mask: &Series<bool>) -> AxionResult<Box<dyn SeriesTrait>>;
fn take_indices(&self, indices: &[usize]) -> AxionResult<Box<dyn SeriesTrait>>;
fn take_indices_option(&self, indices: &[Option<usize>]) -> AxionResult<Box<dyn SeriesTrait>>;
fn rename(&mut self, new_name: &str);
fn series_equal(&self, other: &dyn SeriesTrait) -> bool;
fn compare_row(&self, a_idx: usize, b_idx: usize) -> Ordering;
fn get_as_f64(&self, index: usize) -> AxionResult<Option<f64>>;
}