ListSeries

Struct ListSeries 

Source
pub struct ListSeries { /* private fields */ }
Expand description

表示包含其他 Series 的列表类型 Series

ListSeries 允许在 DataFrame 的单个列中存储复杂的嵌套数据结构。 每个元素本身就是一个 Series,支持不同长度的子 Series。

§特性

  • 支持嵌套的数据结构
  • 内部 Series 可以有不同的长度
  • 统一的内部元素类型约束
  • 完整的 SeriesTrait 实现

Implementations§

Source§

impl ListSeries

Source

pub fn new( name: String, data: Vec<Option<Box<dyn SeriesTrait>>>, inner_dtype: DataType, ) -> Self

创建一个新的 ListSeries

§参数
  • name - Series 名称
  • data - Series 数据向量
  • inner_dtype - 内部元素的统一数据类型
Source

pub fn get_inner_series(&self, index: usize) -> Option<&dyn SeriesTrait>

获取指定索引处的内部 Series

§参数
  • index - 元素索引
§返回值

如果索引有效且值不为 null,返回内部 Series 的引用

Trait Implementations§

Source§

impl Clone for ListSeries

Source§

fn clone(&self) -> ListSeries

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ListSeries

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ListSeries

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SeriesTrait for ListSeries

Source§

fn series_equal(&self, other: &dyn SeriesTrait) -> bool

Compares this ListSeries with another SeriesTrait object for equality.

Source§

fn name(&self) -> &str

返回 Series 的名称
Source§

fn dtype(&self) -> DataType

返回 Series 的数据类型
Source§

fn len(&self) -> usize

返回 Series 的长度
Source§

fn is_empty(&self) -> bool

检查 Series 是否为空
Source§

fn as_any(&self) -> &dyn Any

将 Series 转换为 Any trait 对象,用于向下转型
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

将 Series 转换为可变的 Any trait 对象
Source§

fn clone_box(&self) -> Box<dyn SeriesTrait>

克隆 Series 并返回 trait 对象 Read more
Source§

fn get_str(&self, index: usize) -> Option<String>

获取指定索引处的值的字符串表示 Read more
Source§

fn slice(&self, start: usize, length: usize) -> Box<dyn SeriesTrait>

创建 Series 的切片 Read more
Source§

fn filter(&self, mask: &Series<bool>) -> AxionResult<Box<dyn SeriesTrait>>

根据布尔掩码过滤 Series Read more
Source§

fn take_indices(&self, indices: &[usize]) -> AxionResult<Box<dyn SeriesTrait>>

根据索引列表选取元素 Read more
Source§

fn take_indices_option( &self, indices: &[Option<usize>], ) -> AxionResult<Box<dyn SeriesTrait>>

根据可选索引列表选取元素 Read more
Source§

fn rename(&mut self, new_name: &str)

重命名 Series Read more
Source§

fn compare_row(&self, _a_idx: usize, _b_idx: usize) -> Ordering

比较 Series 中两个索引处的元素 Read more
Source§

fn get_as_f64(&self, index: usize) -> AxionResult<Option<f64>>

尝试将指定索引处的值转换为 f64 Read more
Source§

fn is_null_at(&self, index: usize) -> bool

检查指定索引处的值是否为 null Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.