Type Definition polars_core::datatypes::BinaryChunked
source · pub type BinaryChunked = ChunkedArray<BinaryType>;
Available on crate feature
dtype-binary
only.Trait Implementations§
source§impl Add<&[u8]> for &BinaryChunked
impl Add<&[u8]> for &BinaryChunked
§type Output = ChunkedArray<BinaryType>
type Output = ChunkedArray<BinaryType>
The resulting type after applying the
+
operator.source§impl Add<&ChunkedArray<BinaryType>> for &BinaryChunked
impl Add<&ChunkedArray<BinaryType>> for &BinaryChunked
§type Output = ChunkedArray<BinaryType>
type Output = ChunkedArray<BinaryType>
The resulting type after applying the
+
operator.source§impl Add<ChunkedArray<BinaryType>> for BinaryChunked
impl Add<ChunkedArray<BinaryType>> for BinaryChunked
§type Output = ChunkedArray<BinaryType>
type Output = ChunkedArray<BinaryType>
The resulting type after applying the
+
operator.source§impl AggList for BinaryChunked
impl AggList for BinaryChunked
source§impl ArgAgg for BinaryChunked
impl ArgAgg for BinaryChunked
source§impl ChunkAggSeries for BinaryChunked
impl ChunkAggSeries for BinaryChunked
source§fn sum_as_series(&self) -> Series
fn sum_as_series(&self) -> Series
Get the sum of the ChunkedArray as a new Series of length 1.
source§fn max_as_series(&self) -> Series
fn max_as_series(&self) -> Series
Get the max of the ChunkedArray as a new Series of length 1.
source§fn min_as_series(&self) -> Series
fn min_as_series(&self) -> Series
Get the min of the ChunkedArray as a new Series of length 1.
source§fn prod_as_series(&self) -> Series
fn prod_as_series(&self) -> Series
Get the product of the ChunkedArray as a new Series of length 1.
source§impl ChunkAnyValue for BinaryChunked
impl ChunkAnyValue for BinaryChunked
source§unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
unsafe fn get_any_value_unchecked(&self, index: usize) -> AnyValue<'_>
Get a single value. Beware this is slow.
If you need to use this slightly performant, cast Categorical to UInt32 Read more
source§fn get_any_value(&self, index: usize) -> PolarsResult<AnyValue<'_>>
fn get_any_value(&self, index: usize) -> PolarsResult<AnyValue<'_>>
Get a single value. Beware this is slow.
source§impl<'a> ChunkApply<'a, &'a [u8], Cow<'a, [u8]>> for BinaryChunked
impl<'a> ChunkApply<'a, &'a [u8], Cow<'a, [u8]>> for BinaryChunked
source§fn apply_cast_numeric<F, S>(&'a self, f: F) -> ChunkedArray<S>where
F: Fn(&'a [u8]) -> S::Native + Copy,
S: PolarsNumericType,
fn apply_cast_numeric<F, S>(&'a self, f: F) -> ChunkedArray<S>where
F: Fn(&'a [u8]) -> S::Native + Copy,
S: PolarsNumericType,
Apply a closure elementwise and cast to a Numeric ChunkedArray. This is fastest when the null check branching is more expensive
than the closure application. Read more
source§fn branch_apply_cast_numeric_no_null<F, S>(&'a self, f: F) -> ChunkedArray<S>where
F: Fn(Option<&'a [u8]>) -> S::Native + Copy,
S: PolarsNumericType,
fn branch_apply_cast_numeric_no_null<F, S>(&'a self, f: F) -> ChunkedArray<S>where
F: Fn(Option<&'a [u8]>) -> S::Native + Copy,
S: PolarsNumericType,
Apply a closure on optional values and cast to Numeric ChunkedArray without null values.
source§fn apply<F>(&'a self, f: F) -> Selfwhere
F: Fn(&'a [u8]) -> Cow<'a, [u8]> + Copy,
fn apply<F>(&'a self, f: F) -> Selfwhere
F: Fn(&'a [u8]) -> Cow<'a, [u8]> + Copy,
Apply a closure elementwise. This is fastest when the null check branching is more expensive
than the closure application. Often it is. Read more
fn try_apply<F>(&'a self, f: F) -> PolarsResult<Self>where
F: Fn(&'a [u8]) -> PolarsResult<Cow<'a, [u8]>> + Copy,
source§fn apply_on_opt<F>(&'a self, f: F) -> Selfwhere
F: Fn(Option<&'a [u8]>) -> Option<Cow<'a, [u8]>> + Copy,
fn apply_on_opt<F>(&'a self, f: F) -> Selfwhere
F: Fn(Option<&'a [u8]>) -> Option<Cow<'a, [u8]>> + Copy,
Apply a closure elementwise including null values.
source§fn apply_with_idx<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, &'a [u8])) -> Cow<'a, [u8]> + Copy,
fn apply_with_idx<F>(&'a self, f: F) -> Selfwhere
F: Fn((usize, &'a [u8])) -> Cow<'a, [u8]> + Copy,
Apply a closure elementwise. The closure gets the index of the element as first argument.
source§impl ChunkApplyKernel<BinaryArray<i64>> for BinaryChunked
impl ChunkApplyKernel<BinaryArray<i64>> for BinaryChunked
source§fn apply_kernel(&self, f: &dyn Fn(&LargeBinaryArray) -> ArrayRef) -> Self
fn apply_kernel(&self, f: &dyn Fn(&LargeBinaryArray) -> ArrayRef) -> Self
Apply kernel and return result as a new ChunkedArray.
source§fn apply_kernel_cast<S>(
&self,
f: &dyn Fn(&LargeBinaryArray) -> ArrayRef
) -> ChunkedArray<S>where
S: PolarsDataType,
fn apply_kernel_cast<S>(
&self,
f: &dyn Fn(&LargeBinaryArray) -> ArrayRef
) -> ChunkedArray<S>where
S: PolarsDataType,
Apply a kernel that outputs an array of different type.
source§impl ChunkCast for BinaryChunked
impl ChunkCast for BinaryChunked
source§fn cast(&self, data_type: &DataType) -> PolarsResult<Series>
fn cast(&self, data_type: &DataType) -> PolarsResult<Series>
Cast a
[ChunkedArray]
to [DataType]
source§fn cast_unchecked(&self, data_type: &DataType) -> PolarsResult<Series>
fn cast_unchecked(&self, data_type: &DataType) -> PolarsResult<Series>
Does not check if the cast is a valid one and may over/underflow
source§impl ChunkCompare<&[u8]> for BinaryChunked
impl ChunkCompare<&[u8]> for BinaryChunked
type Item = ChunkedArray<BooleanType>
source§fn equal(&self, rhs: &[u8]) -> BooleanChunked
fn equal(&self, rhs: &[u8]) -> BooleanChunked
Check for equality.
source§fn not_equal(&self, rhs: &[u8]) -> BooleanChunked
fn not_equal(&self, rhs: &[u8]) -> BooleanChunked
Check for inequality.
source§fn gt(&self, rhs: &[u8]) -> BooleanChunked
fn gt(&self, rhs: &[u8]) -> BooleanChunked
Greater than comparison.
source§fn gt_eq(&self, rhs: &[u8]) -> BooleanChunked
fn gt_eq(&self, rhs: &[u8]) -> BooleanChunked
Greater than or equal comparison.
source§fn lt(&self, rhs: &[u8]) -> BooleanChunked
fn lt(&self, rhs: &[u8]) -> BooleanChunked
Less than comparison.
source§fn lt_eq(&self, rhs: &[u8]) -> BooleanChunked
fn lt_eq(&self, rhs: &[u8]) -> BooleanChunked
Less than or equal comparison
source§impl ChunkCompare<&ChunkedArray<BinaryType>> for BinaryChunked
impl ChunkCompare<&ChunkedArray<BinaryType>> for BinaryChunked
type Item = ChunkedArray<BooleanType>
source§fn equal(&self, rhs: &BinaryChunked) -> BooleanChunked
fn equal(&self, rhs: &BinaryChunked) -> BooleanChunked
Check for equality.
source§fn not_equal(&self, rhs: &BinaryChunked) -> BooleanChunked
fn not_equal(&self, rhs: &BinaryChunked) -> BooleanChunked
Check for inequality.
source§fn gt(&self, rhs: &BinaryChunked) -> BooleanChunked
fn gt(&self, rhs: &BinaryChunked) -> BooleanChunked
Greater than comparison.
source§fn gt_eq(&self, rhs: &BinaryChunked) -> BooleanChunked
fn gt_eq(&self, rhs: &BinaryChunked) -> BooleanChunked
Greater than or equal comparison.
source§fn lt(&self, rhs: &BinaryChunked) -> BooleanChunked
fn lt(&self, rhs: &BinaryChunked) -> BooleanChunked
Less than comparison.
source§fn lt_eq(&self, rhs: &BinaryChunked) -> BooleanChunked
fn lt_eq(&self, rhs: &BinaryChunked) -> BooleanChunked
Less than or equal comparison
source§impl ChunkExpandAtIndex<BinaryType> for BinaryChunked
impl ChunkExpandAtIndex<BinaryType> for BinaryChunked
source§fn new_from_index(&self, index: usize, length: usize) -> BinaryChunked
fn new_from_index(&self, index: usize, length: usize) -> BinaryChunked
Create a new ChunkedArray filled with values at that index.
source§impl ChunkFillNull for BinaryChunked
impl ChunkFillNull for BinaryChunked
source§fn fill_null(&self, strategy: FillNullStrategy) -> PolarsResult<Self>
fn fill_null(&self, strategy: FillNullStrategy) -> PolarsResult<Self>
Replace None values with one of the following strategies: Read more
source§impl ChunkFillNullValue<&[u8]> for BinaryChunked
impl ChunkFillNullValue<&[u8]> for BinaryChunked
source§fn fill_null_with_values(&self, value: &[u8]) -> PolarsResult<Self>
fn fill_null_with_values(&self, value: &[u8]) -> PolarsResult<Self>
Replace None values with a give value
T
.source§impl ChunkFilter<BinaryType> for BinaryChunked
impl ChunkFilter<BinaryType> for BinaryChunked
source§fn filter(
&self,
filter: &BooleanChunked
) -> PolarsResult<ChunkedArray<BinaryType>>
fn filter(
&self,
filter: &BooleanChunked
) -> PolarsResult<ChunkedArray<BinaryType>>
Filter values in the ChunkedArray with a boolean mask. Read more
source§impl<'a> ChunkFull<&'a [u8]> for BinaryChunked
impl<'a> ChunkFull<&'a [u8]> for BinaryChunked
source§impl ChunkFullNull for BinaryChunked
impl ChunkFullNull for BinaryChunked
source§impl ChunkReverse<BinaryType> for BinaryChunked
impl ChunkReverse<BinaryType> for BinaryChunked
source§impl<'a> ChunkSet<'a, &'a [u8], Vec<u8, Global>> for BinaryChunked
impl<'a> ChunkSet<'a, &'a [u8], Vec<u8, Global>> for BinaryChunked
source§fn set_at_idx<I: IntoIterator<Item = IdxSize>>(
&'a self,
idx: I,
opt_value: Option<&'a [u8]>
) -> PolarsResult<Self>where
Self: Sized,
fn set_at_idx<I: IntoIterator<Item = IdxSize>>(
&'a self,
idx: I,
opt_value: Option<&'a [u8]>
) -> PolarsResult<Self>where
Self: Sized,
source§fn set_at_idx_with<I: IntoIterator<Item = IdxSize>, F>(
&'a self,
idx: I,
f: F
) -> PolarsResult<Self>where
Self: Sized,
F: Fn(Option<&'a [u8]>) -> Option<Vec<u8>>,
fn set_at_idx_with<I: IntoIterator<Item = IdxSize>, F>(
&'a self,
idx: I,
f: F
) -> PolarsResult<Self>where
Self: Sized,
F: Fn(Option<&'a [u8]>) -> Option<Vec<u8>>,
Set the values at indexes
idx
by applying a closure to these values. Read moresource§fn set(
&'a self,
mask: &BooleanChunked,
value: Option<&'a [u8]>
) -> PolarsResult<Self>where
Self: Sized,
fn set(
&'a self,
mask: &BooleanChunked,
value: Option<&'a [u8]>
) -> PolarsResult<Self>where
Self: Sized,
source§impl ChunkShift<BinaryType> for BinaryChunked
impl ChunkShift<BinaryType> for BinaryChunked
source§impl ChunkShiftFill<BinaryType, Option<&[u8]>> for BinaryChunked
impl ChunkShiftFill<BinaryType, Option<&[u8]>> for BinaryChunked
source§fn shift_and_fill(&self, periods: i64, fill_value: Option<&[u8]>) -> BinaryChunked
fn shift_and_fill(&self, periods: i64, fill_value: Option<&[u8]>) -> BinaryChunked
Shift the values by a given period and fill the parts that will be empty due to this operation
with
fill_value
.source§impl ChunkSort<BinaryType> for BinaryChunked
impl ChunkSort<BinaryType> for BinaryChunked
source§fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> PolarsResult<IdxCa>
fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> PolarsResult<IdxCa>
Panics
This function is very opinionated. On the implementation of ChunkedArray<T>
for numeric types,
we assume that all numeric Series
are of the same type.
In this case we assume that all numeric Series
are f64
types. The caller needs to
uphold this contract. If not, it will panic.
fn sort_with(&self, options: SortOptions) -> ChunkedArray<BinaryType>
source§fn sort(&self, reverse: bool) -> BinaryChunked
fn sort(&self, reverse: bool) -> BinaryChunked
Returned a sorted
ChunkedArray
.source§fn argsort(&self, options: SortOptions) -> IdxCa
fn argsort(&self, options: SortOptions) -> IdxCa
Retrieve the indexes needed to sort this array.
source§impl ChunkTake for BinaryChunked
impl ChunkTake for BinaryChunked
source§unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Selfwhere
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
unsafe fn take_unchecked<I, INulls>(
&self,
indices: TakeIdx<'_, I, INulls>
) -> Selfwhere
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
Take values from ChunkedArray by index. Read more
source§fn take<I, INulls>(&self, indices: TakeIdx<'_, I, INulls>) -> PolarsResult<Self>where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
fn take<I, INulls>(&self, indices: TakeIdx<'_, I, INulls>) -> PolarsResult<Self>where
Self: Sized,
I: TakeIterator,
INulls: TakeIteratorNulls,
Take values from ChunkedArray by index.
Note that the iterator will be cloned, so prefer an iterator that takes the owned memory
by reference.
source§impl ChunkTakeEvery<BinaryType> for BinaryChunked
impl ChunkTakeEvery<BinaryType> for BinaryChunked
source§fn take_every(&self, n: usize) -> BinaryChunked
fn take_every(&self, n: usize) -> BinaryChunked
Traverse and collect every nth element in a new array.
source§impl ChunkUnique<BinaryType> for BinaryChunked
impl ChunkUnique<BinaryType> for BinaryChunked
source§fn unique(&self) -> PolarsResult<Self>
fn unique(&self) -> PolarsResult<Self>
Get unique values of a ChunkedArray
source§fn arg_unique(&self) -> PolarsResult<IdxCa>
fn arg_unique(&self) -> PolarsResult<IdxCa>
Get first index of the unique values in a
ChunkedArray
.
This Vec is sorted.source§fn is_unique(&self) -> PolarsResult<BooleanChunked>
fn is_unique(&self) -> PolarsResult<BooleanChunked>
Get a mask of all the unique values.
source§fn is_duplicated(&self) -> PolarsResult<BooleanChunked>
fn is_duplicated(&self) -> PolarsResult<BooleanChunked>
Get a mask of all the duplicated values.
source§fn n_unique(&self) -> PolarsResult<usize>
fn n_unique(&self) -> PolarsResult<usize>
Number of unique values in the
ChunkedArray
source§fn mode(&self) -> PolarsResult<Self>
fn mode(&self) -> PolarsResult<Self>
Available on crate feature
mode
only.The most occurring value(s). Can return multiple Values
source§impl ChunkZip<BinaryType> for BinaryChunked
Available on crate feature zip_with
only.
impl ChunkZip<BinaryType> for BinaryChunked
Available on crate feature
zip_with
only.source§fn zip_with(
&self,
mask: &BooleanChunked,
other: &BinaryChunked
) -> PolarsResult<BinaryChunked>
fn zip_with(
&self,
mask: &BooleanChunked,
other: &BinaryChunked
) -> PolarsResult<BinaryChunked>
Create a new ChunkedArray with values from self where the mask evaluates
true
and values
from other
where the mask evaluates false
source§impl Debug for BinaryChunked
impl Debug for BinaryChunked
source§impl From<(&str, BinaryArray<i64>)> for BinaryChunked
impl From<(&str, BinaryArray<i64>)> for BinaryChunked
source§impl<Ptr> FromIterator<Option<Ptr>> for BinaryChunkedwhere
Ptr: AsRef<[u8]>,
impl<Ptr> FromIterator<Option<Ptr>> for BinaryChunkedwhere
Ptr: AsRef<[u8]>,
source§impl<Ptr> FromIterator<Ptr> for BinaryChunkedwhere
Ptr: PolarsAsRef<[u8]>,
impl<Ptr> FromIterator<Ptr> for BinaryChunkedwhere
Ptr: PolarsAsRef<[u8]>,
source§fn from_iter<I: IntoIterator<Item = Ptr>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Ptr>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl<Ptr> FromTrustedLenIterator<Option<Ptr>> for BinaryChunkedwhere
Ptr: AsRef<[u8]>,
impl<Ptr> FromTrustedLenIterator<Option<Ptr>> for BinaryChunkedwhere
Ptr: AsRef<[u8]>,
fn from_iter_trusted_length<I: IntoIterator<Item = Option<Ptr>>>(
iter: I
) -> Self
source§impl<Ptr> FromTrustedLenIterator<Ptr> for BinaryChunkedwhere
Ptr: PolarsAsRef<[u8]>,
impl<Ptr> FromTrustedLenIterator<Ptr> for BinaryChunkedwhere
Ptr: PolarsAsRef<[u8]>,
fn from_iter_trusted_length<I: IntoIterator<Item = Ptr>>(iter: I) -> Self
source§impl IntoGroupsProxy for BinaryChunked
impl IntoGroupsProxy for BinaryChunked
source§fn group_tuples<'a>(
&'a self,
multithreaded: bool,
sorted: bool
) -> PolarsResult<GroupsProxy>
fn group_tuples<'a>(
&'a self,
multithreaded: bool,
sorted: bool
) -> PolarsResult<GroupsProxy>
Create the tuples need for a groupby operation.
* The first value in the tuple is the first index of the group.
* The second value in the tuple is are the indexes of the groups including the first value.
source§impl<'a> IntoIterator for &'a BinaryChunked
impl<'a> IntoIterator for &'a BinaryChunked
§type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<BinaryType> as IntoIterator>::Item> + 'a, Global>
type IntoIter = Box<dyn PolarsIterator<Item = <&'a ChunkedArray<BinaryType> as IntoIterator>::Item> + 'a, Global>
Which kind of iterator are we turning this into?
source§impl<'a> IntoTakeRandom<'a> for &'a BinaryChunked
impl<'a> IntoTakeRandom<'a> for &'a BinaryChunked
type Item = &'a [u8]
type TakeRandom = TakeRandBranch2<BinaryTakeRandomSingleChunk<'a>, BinaryTakeRandom<'a>>
source§fn take_rand(&self) -> Self::TakeRandom
fn take_rand(&self) -> Self::TakeRandom
Create a type that implements
TakeRandom
.source§impl IsFirst<BinaryType> for BinaryChunked
Available on crate feature is_first
only.
impl IsFirst<BinaryType> for BinaryChunked
Available on crate feature
is_first
only.fn is_first(&self) -> PolarsResult<BooleanChunked>
source§impl IsIn for BinaryChunked
Available on crate feature is_in
only.
impl IsIn for BinaryChunked
Available on crate feature
is_in
only.source§fn is_in(&self, other: &Series) -> PolarsResult<BooleanChunked>
fn is_in(&self, other: &Series) -> PolarsResult<BooleanChunked>
Check if elements of this array are in the right Series, or List values of the right Series.
source§impl<'a, T: AsRef<[Option<Cow<'a, [u8]>>]>> NamedFrom<T, [Option<Cow<'a, [u8]>>]> for BinaryChunked
impl<'a, T: AsRef<[Option<Cow<'a, [u8]>>]>> NamedFrom<T, [Option<Cow<'a, [u8]>>]> for BinaryChunked
source§impl<B> NewChunkedArray<BinaryType, B> for BinaryChunkedwhere
B: AsRef<[u8]>,
impl<B> NewChunkedArray<BinaryType, B> for BinaryChunkedwhere
B: AsRef<[u8]>,
source§fn from_iter_values(name: &str, it: impl Iterator<Item = B>) -> Self
fn from_iter_values(name: &str, it: impl Iterator<Item = B>) -> Self
Create a new ChunkedArray from an iterator.
fn from_slice(name: &str, v: &[B]) -> Self
fn from_slice_options(name: &str, opt_v: &[Option<B>]) -> Self
source§impl NumOpsDispatch for BinaryChunked
impl NumOpsDispatch for BinaryChunked
fn add_to(&self, rhs: &Series) -> PolarsResult<Series>
fn subtract(&self, rhs: &Series) -> PolarsResult<Series>
fn multiply(&self, rhs: &Series) -> PolarsResult<Series>
fn divide(&self, rhs: &Series) -> PolarsResult<Series>
fn remainder(&self, rhs: &Series) -> PolarsResult<Series>
source§impl RepeatBy for BinaryChunked
Available on crate feature repeat_by
only.
impl RepeatBy for BinaryChunked
Available on crate feature
repeat_by
only.source§fn repeat_by(&self, by: &IdxCa) -> ListChunked
fn repeat_by(&self, by: &IdxCa) -> ListChunked
Repeat the values
n
times, where n
is determined by the values in by
.source§impl<'a> TakeRandom for &'a BinaryChunked
impl<'a> TakeRandom for &'a BinaryChunked
source§impl ValueSize for BinaryChunked
impl ValueSize for BinaryChunked
source§fn get_values_size(&self) -> usize
fn get_values_size(&self) -> usize
Useful for a Utf8 or a List to get underlying value size.
During a rechunk this is handy
source§impl VecHash for BinaryChunked
impl VecHash for BinaryChunked
source§fn vec_hash(&self, random_state: RandomState, buf: &mut Vec<u64>)
fn vec_hash(&self, random_state: RandomState, buf: &mut Vec<u64>)
Compute the hash for all values in the array. Read more