Struct polars_core::frame::group_by::GroupsIdx
source · pub struct GroupsIdx { /* private fields */ }
Available on crate feature
algorithm_group_by
only.Expand description
Indexes of the groups, the first index is stored separately. this make sorting fast.
Implementations§
source§impl GroupsIdx
impl GroupsIdx
pub fn new(first: Vec<IdxSize>, all: Vec<IdxVec>, sorted: bool) -> Self
pub fn sort(&mut self)
pub fn is_sorted_flag(&self) -> bool
pub fn iter(&self) -> Zip<Copied<Iter<'_, IdxSize>>, Iter<'_, IdxVec>>
pub fn all(&self) -> &[IdxVec]
pub fn first(&self) -> &[IdxSize]
pub fn first_mut(&mut self) -> &mut Vec<IdxSize>
Trait Implementations§
source§impl From<GroupsIdx> for GroupsProxy
impl From<GroupsIdx> for GroupsProxy
source§impl FromParallelIterator<(u32, UnitVec<u32>)> for GroupsIdx
impl FromParallelIterator<(u32, UnitVec<u32>)> for GroupsIdx
source§fn from_par_iter<I>(par_iter: I) -> Selfwhere
I: IntoParallelIterator<Item = IdxItem>,
fn from_par_iter<I>(par_iter: I) -> Selfwhere
I: IntoParallelIterator<Item = IdxItem>,
Creates an instance of the collection from the parallel iterator
par_iter
. Read moresource§impl<'a> IntoIterator for &'a GroupsIdx
impl<'a> IntoIterator for &'a GroupsIdx
source§impl IntoIterator for GroupsIdx
impl IntoIterator for GroupsIdx
source§impl PartialEq for GroupsIdx
impl PartialEq for GroupsIdx
impl Eq for GroupsIdx
impl StructuralPartialEq for GroupsIdx
Auto Trait Implementations§
impl Freeze for GroupsIdx
impl RefUnwindSafe for GroupsIdx
impl Send for GroupsIdx
impl Sync for GroupsIdx
impl Unpin for GroupsIdx
impl UnwindSafe for GroupsIdx
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<A, T, E> FromFallibleIterator<A, E> for Twhere
T: FromIterator<A>,
E: Error,
impl<A, T, E> FromFallibleIterator<A, E> for Twhere
T: FromIterator<A>,
E: Error,
fn from_fallible_iter<F>(iter: F) -> Result<T, E>where
F: FallibleIterator<E, Item = A>,
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more