Type Alias DurationChunked

Source
pub type DurationChunked = Logical<DurationType, Int64Type>;

Aliased Type§

struct DurationChunked(pub ChunkedArray<Int64Type>, _, pub Option<DataType>);

Fields§

§0: ChunkedArray<Int64Type>§2: Option<DataType>

Implementations

Source§

impl Logical<DurationType, Int64Type>

Source

pub fn time_unit(&self) -> TimeUnit

Source

pub fn cast_time_unit(&self, tu: TimeUnit) -> Logical<DurationType, Int64Type>

Change the underlying TimeUnit. And update the data accordingly.

Source

pub fn set_time_unit(&mut self, tu: TimeUnit)

Change the underlying TimeUnit. This does not modify the data.

Source

pub fn to_string( &self, format: &str, ) -> Result<ChunkedArray<StringType>, PolarsError>

Convert from Duration to String; note that strftime format strings are not supported, only the specifiers ‘iso’ and ‘polars’.

Source

pub fn from_duration<I>( name: PlSmallStr, v: I, tu: TimeUnit, ) -> Logical<DurationType, Int64Type>
where I: IntoIterator<Item = TimeDelta>,

Construct a new DurationChunked from an iterator over ChronoDuration.

Source

pub fn from_duration_options<I>( name: PlSmallStr, v: I, tu: TimeUnit, ) -> Logical<DurationType, Int64Type>
where I: IntoIterator<Item = Option<TimeDelta>>,

Construct a new DurationChunked from an iterator over optional ChronoDuration.

Source§

impl<K, T> Logical<K, T>

Source

pub fn new_logical<J>(ca: ChunkedArray<T>) -> Logical<J, T>
where J: PolarsDataType,

Source§

impl<K, T> Logical<K, T>

Source

pub fn physical(&self) -> &ChunkedArray<T>

Source

pub fn field(&self) -> Field

Trait Implementations

Source§

impl<K, T> Clone for Logical<K, T>

Source§

fn clone(&self) -> Logical<K, T>

Returns a copy 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<K, T> Default for Logical<K, T>

Source§

fn default() -> Logical<K, T>

Returns the “default value” for a type. Read more
Source§

impl<K, T> Deref for Logical<K, T>

Source§

type Target = ChunkedArray<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Logical<K, T> as Deref>::Target

Dereferences the value.
Source§

impl<K, T> DerefMut for Logical<K, T>

Source§

fn deref_mut(&mut self) -> &mut <Logical<K, T> as Deref>::Target

Mutably dereferences the value.
Source§

impl DurationMethods for Logical<DurationType, Int64Type>

Source§

fn hours(&self) -> ChunkedArray<Int64Type>

Extract the hours from a Duration

Source§

fn days(&self) -> ChunkedArray<Int64Type>

Extract the days from a Duration

Source§

fn minutes(&self) -> ChunkedArray<Int64Type>

Extract the seconds from a Duration

Source§

fn seconds(&self) -> ChunkedArray<Int64Type>

Extract the seconds from a Duration

Source§

fn milliseconds(&self) -> ChunkedArray<Int64Type>

Extract the milliseconds from a Duration

Source§

fn microseconds(&self) -> ChunkedArray<Int64Type>

Extract the microseconds from a Duration

Source§

fn nanoseconds(&self) -> ChunkedArray<Int64Type>

Extract the nanoseconds from a Duration

Source§

impl IntoSeries for Logical<DurationType, Int64Type>

Source§

impl LogicalType for Logical<DurationType, Int64Type>

Source§

fn dtype(&self) -> &DataType

Get data type of ChunkedArray.
Source§

fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>

Source§

unsafe fn get_any_value_unchecked(&self, i: usize) -> AnyValue<'_>

Safety Read more
Source§

fn cast_with_options( &self, dtype: &DataType, cast_options: CastOptions, ) -> Result<Series, PolarsError>

Source§

fn cast(&self, dtype: &DataType) -> Result<Series, PolarsError>

Source§

impl<T> NamedFrom<T, [Option<TimeDelta>]> for Logical<DurationType, Int64Type>
where T: AsRef<[Option<TimeDelta>]>,

Source§

fn new(name: PlSmallStr, v: T) -> Logical<DurationType, Int64Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [TimeDelta]> for Logical<DurationType, Int64Type>
where T: AsRef<[TimeDelta]>,

Source§

fn new(name: PlSmallStr, v: T) -> Logical<DurationType, Int64Type>

Initialize by name and values.