Type Alias DateChunked

Source
pub type DateChunked = Logical<DateType, Int32Type>;

Aliased Type§

struct DateChunked(pub ChunkedArray<Int32Type>, _, pub Option<DataType>);

Fields§

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

Implementations

Source§

impl Logical<DateType, Int32Type>

Source

pub fn as_date_iter(&self) -> impl TrustedLen

Source

pub fn from_naive_date<I>( name: PlSmallStr, v: I, ) -> Logical<DateType, Int32Type>
where I: IntoIterator<Item = NaiveDate>,

Construct a new DateChunked from an iterator over NaiveDate.

Source

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

Convert from Date into String with the given format. See chrono strftime/strptime.

Source

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

Convert from Date into String with the given format. See chrono strftime/strptime.

Alias for to_string.

Source

pub fn from_naive_date_options<I>( name: PlSmallStr, v: I, ) -> Logical<DateType, Int32Type>
where I: IntoIterator<Item = Option<NaiveDate>>,

Construct a new DateChunked from an iterator over optional NaiveDate.

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 DateMethods for Logical<DateType, Int32Type>

Source§

fn parse_from_str_slice( name: PlSmallStr, v: &[&str], fmt: &str, ) -> Logical<DateType, Int32Type>

Source§

fn year(&self) -> ChunkedArray<Int32Type>

Extract month from underlying NaiveDate representation. Returns the year number in the calendar date.
Source§

fn is_leap_year(&self) -> ChunkedArray<BooleanType>

Extract year from underlying NaiveDate representation. Returns whether the year is a leap year.
Source§

fn iso_year(&self) -> ChunkedArray<Int32Type>

This year number might not match the calendar year number.
Source§

fn quarter(&self) -> ChunkedArray<Int8Type>

Extract month from underlying NaiveDateTime representation. Quarters range from 1 to 4.
Source§

fn month(&self) -> ChunkedArray<Int8Type>

Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1. Read more
Source§

fn week(&self) -> ChunkedArray<Int8Type>

Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
Source§

fn day(&self) -> ChunkedArray<Int8Type>

Extract day from underlying NaiveDate representation. Returns the day of month starting from 1. Read more
Source§

fn ordinal(&self) -> ChunkedArray<Int16Type>

Returns the day of year starting from 1. Read more
Source§

fn new_from_parts( year: &ChunkedArray<Int32Type>, month: &ChunkedArray<Int8Type>, day: &ChunkedArray<Int8Type>, name: PlSmallStr, ) -> Result<Logical<DateType, Int32Type>, PolarsError>

Construct a date ChunkedArray from individual time components.
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 From<ChunkedArray<Int32Type>> for Logical<DateType, Int32Type>

Source§

fn from(ca: ChunkedArray<Int32Type>) -> Logical<DateType, Int32Type>

Converts to this type from the input type.
Source§

impl IntoSeries for Logical<DateType, Int32Type>

Source§

impl LogicalType for Logical<DateType, Int32Type>

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, [NaiveDate]> for Logical<DateType, Int32Type>
where T: AsRef<[NaiveDate]>,

Available on crate feature dtype-date only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DateType, Int32Type>

Initialize by name and values.
Source§

impl<T> NamedFrom<T, [Option<NaiveDate>]> for Logical<DateType, Int32Type>
where T: AsRef<[Option<NaiveDate>]>,

Available on crate feature dtype-date only.
Source§

fn new(name: PlSmallStr, v: T) -> Logical<DateType, Int32Type>

Initialize by name and values.
Source§

impl PolarsRound for Logical<DateType, Int32Type>

Source§

impl PolarsTruncate for Logical<DateType, Int32Type>