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>
impl Logical<DateType, Int32Type>
pub fn as_date_iter(&self) -> impl TrustedLen
Sourcepub fn from_naive_date<I>(
name: PlSmallStr,
v: I,
) -> Logical<DateType, Int32Type>where
I: IntoIterator<Item = NaiveDate>,
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
.
Sourcepub fn to_string(
&self,
format: &str,
) -> Result<ChunkedArray<StringType>, PolarsError>
pub fn to_string( &self, format: &str, ) -> Result<ChunkedArray<StringType>, PolarsError>
Convert from Date into String with the given format. See chrono strftime/strptime.
Sourcepub fn strftime(
&self,
format: &str,
) -> Result<ChunkedArray<StringType>, PolarsError>
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
.
Sourcepub fn from_naive_date_options<I>(
name: PlSmallStr,
v: I,
) -> Logical<DateType, Int32Type>
pub fn from_naive_date_options<I>( name: PlSmallStr, v: I, ) -> Logical<DateType, Int32Type>
Construct a new DateChunked
from an iterator over optional NaiveDate
.
Source§impl<K, T> Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
impl<K, T> Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
pub fn new_logical<J>(ca: ChunkedArray<T>) -> Logical<J, T>where
J: PolarsDataType,
Trait Implementations
Source§impl<K, T> Clone for Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
impl<K, T> Clone for Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
Source§impl DateMethods for Logical<DateType, Int32Type>
impl DateMethods for Logical<DateType, Int32Type>
fn parse_from_str_slice( name: PlSmallStr, v: &[&str], fmt: &str, ) -> Logical<DateType, Int32Type>
Source§fn year(&self) -> ChunkedArray<Int32Type>
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>
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>
fn iso_year(&self) -> ChunkedArray<Int32Type>
This year number might not match the calendar year number.
Source§fn quarter(&self) -> ChunkedArray<Int8Type>
fn quarter(&self) -> ChunkedArray<Int8Type>
Extract month from underlying NaiveDateTime representation.
Quarters range from 1 to 4.
Source§fn month(&self) -> ChunkedArray<Int8Type>
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>
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>
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>
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>
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>where
K: PolarsDataType,
T: PolarsDataType,
impl<K, T> Default for Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
Source§impl<K, T> Deref for Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
impl<K, T> Deref for Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
Source§impl<K, T> DerefMut for Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
impl<K, T> DerefMut for Logical<K, T>where
K: PolarsDataType,
T: PolarsDataType,
Source§impl LogicalType for Logical<DateType, Int32Type>
impl LogicalType for Logical<DateType, Int32Type>
Source§fn dtype(&self) -> &DataType
fn dtype(&self) -> &DataType
Get data type of
ChunkedArray
.Source§fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>
fn get_any_value(&self, i: usize) -> Result<AnyValue<'_>, PolarsError>
Gets
AnyValue
from LogicalType
fn cast_with_options( &self, dtype: &DataType, cast_options: CastOptions, ) -> Result<Series, PolarsError>
fn cast(&self, dtype: &DataType) -> Result<Series, PolarsError>
Source§impl<T> NamedFrom<T, [NaiveDate]> for Logical<DateType, Int32Type>
Available on crate feature dtype-date
only.
impl<T> NamedFrom<T, [NaiveDate]> for Logical<DateType, Int32Type>
Available on crate feature
dtype-date
only.Source§impl<T> NamedFrom<T, [Option<NaiveDate>]> for Logical<DateType, Int32Type>
Available on crate feature dtype-date
only.
impl<T> NamedFrom<T, [Option<NaiveDate>]> for Logical<DateType, Int32Type>
Available on crate feature
dtype-date
only.