pub trait ChunkCast {
    // Required methods
    fn cast(&self, data_type: &DataType) -> PolarsResult<Series>;
    fn cast_unchecked(&self, data_type: &DataType) -> PolarsResult<Series>;
}
Expand description

Cast ChunkedArray<T> to ChunkedArray<N>

Required Methods§

source

fn cast(&self, data_type: &DataType) -> PolarsResult<Series>

Cast a [ChunkedArray] to [DataType]

source

fn cast_unchecked(&self, data_type: &DataType) -> PolarsResult<Series>

Does not check if the cast is a valid one and may over/underflow

Implementors§

source§

impl ChunkCast for BooleanChunked

source§

impl ChunkCast for ListChunked

We cannot cast anything to or from List/LargeList So this implementation casts the inner type

source§

impl ChunkCast for Utf8Chunked

source§

impl<T> ChunkCast for ChunkedArray<T>where T: PolarsNumericType,