[go: up one dir, main page]

pub trait ArrayExt: Array {
    // Required methods
    fn get_child_length(&self, child_nr: usize) -> usize;
    fn clean_for_polars(&self) -> Box<dyn Array>;
}

Required Methods§

source

fn get_child_length(&self, child_nr: usize) -> usize

Returns the length of the child array at the given index.

  • Panics if self is not a ListArray<i32>.
  • Panics if child_nr is out of bounds.
source

fn clean_for_polars(&self) -> Box<dyn Array>

Create a new Array which avoids problematic types for polars.

This does the following conversion:

  • FixedSizeList -> List
  • Union -> Struct

Nested types are expanded and cleaned recursively

Implementations on Foreign Types§

source§

impl ArrayExt for dyn Array

source§

fn get_child_length(&self, child_nr: usize) -> usize

Return the length of the first child.

Panics

Panics if Self is not a ListArray<i32>, or if the array is empty (no children).

source§

fn clean_for_polars(&self) -> Box<dyn Array>

Create a new Array which avoids problematic types for polars.

This does the following conversion:

  • FixedSizeList -> List
  • Union -> Struct

Nested types are expanded and cleaned recursively

Implementors§