pub enum Selector {
Union(Arc<Selector>, Arc<Selector>),
Difference(Arc<Selector>, Arc<Selector>),
ExclusiveOr(Arc<Selector>, Arc<Selector>),
Intersect(Arc<Selector>, Arc<Selector>),
ByName {
names: Arc<[PlSmallStr]>,
strict: bool,
},
ByIndex {
indices: Arc<[i64]>,
strict: bool,
},
Matches(PlSmallStr),
ByDType(DataTypeSelector),
Wildcard,
Empty,
}
Variants§
Union(Arc<Selector>, Arc<Selector>)
Difference(Arc<Selector>, Arc<Selector>)
ExclusiveOr(Arc<Selector>, Arc<Selector>)
Intersect(Arc<Selector>, Arc<Selector>)
ByName
ByIndex
Matches(PlSmallStr)
ByDType(DataTypeSelector)
Wildcard
Empty
Implementations§
Source§impl Selector
impl Selector
Sourcepub fn into_columns(
&self,
schema: &Schema<DataType>,
ignored_columns: &HashSet<PlSmallStr, RandomState>,
) -> Result<IndexSet<PlSmallStr, RandomState>, PolarsError>
pub fn into_columns( &self, schema: &Schema<DataType>, ignored_columns: &HashSet<PlSmallStr, RandomState>, ) -> Result<IndexSet<PlSmallStr, RandomState>, PolarsError>
Turns the selector into an ordered set of selected columns from the schema.
- The order of the columns corresponds to the order in the schema.
- Column names in
ignored_columns
are only used if they are explicitly mentioned by aByName
orNth
.
pub fn as_expr(self) -> Expr
pub fn to_dtype_selector(&self) -> Option<DataTypeSelector>
Sourcepub fn exclude_cols(self, columns: impl IntoVec<PlSmallStr>) -> Selector
pub fn exclude_cols(self, columns: impl IntoVec<PlSmallStr>) -> Selector
Exclude a column from a wildcard/regex selection.
You may also use regexes in the exclude as long as they start with ^
and end with $
.
pub fn exclude_dtype<D>(self, dtypes: D) -> Selector
Trait Implementations§
Source§impl BitAndAssign for Selector
impl BitAndAssign for Selector
Source§fn bitand_assign(&mut self, rhs: Selector)
fn bitand_assign(&mut self, rhs: Selector)
Performs the
&=
operation. Read moreSource§impl BitOrAssign for Selector
impl BitOrAssign for Selector
Source§fn bitor_assign(&mut self, rhs: Selector)
fn bitor_assign(&mut self, rhs: Selector)
Performs the
|=
operation. Read moreSource§impl BitXorAssign for Selector
impl BitXorAssign for Selector
Source§fn bitxor_assign(&mut self, rhs: Selector)
fn bitxor_assign(&mut self, rhs: Selector)
Performs the
^=
operation. Read moreSource§impl<'de> Deserialize<'de> for Selector
impl<'de> Deserialize<'de> for Selector
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Selector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Selector, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Selector> for PySelector
impl From<Selector> for PySelector
Source§impl Serialize for Selector
impl Serialize for Selector
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl SubAssign for Selector
impl SubAssign for Selector
Source§fn sub_assign(&mut self, rhs: Selector)
fn sub_assign(&mut self, rhs: Selector)
Performs the
-=
operation. Read moreimpl Eq for Selector
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnwindSafe for Selector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.