Skip to content

Selector ​

Namespace: Polars.FSharp

A column selection strategy (e.g., all columns, or specific columns).

Constructors & Static Methods ​

Float ​

fsharp
static member Float : unit -> Selector

Operators ​

( &&& ) Bitwise AND ​

AND operator: s1 &&& s2 (Intersection)

fsharp
static member op_BitwiseAnd(l: Selector, r: Selector) : Selector

Parameters

NameTypeDescription
lSelector-
rSelector-

Example

fsharp
pl.cs.numeric() &&& pl.cs.matches("Val")

( ||| ) Bitwise OR ​

OR operator: s1 ||| s2 (Union)

fsharp
static member op_BitwiseOr(l: Selector, r: Selector) : Selector

Parameters

NameTypeDescription
lSelector-
rSelector-

Example

fsharp
pl.cs.startsWith("A") ||| pl.cs.endsWith("Z")

( ^^^ ) Exclusive OR ​

XOR operator: s1 ^^^ s2 (Symmetric Difference)

fsharp
static member op_ExclusiveOr(l: Selector, r: Selector) : Selector

Parameters

NameTypeDescription
lSelector-
rSelector-

Example

fsharp
pl.cs.numeric() ^^^ pl.cs.matches("Val")

( ~~~ ) Bitwise NOT ​

NOT operator: ~selector

fsharp
static member op_LogicalNot(s: Selector) : Selector

Parameters

NameTypeDescription
sSelector-

Example

fsharp
~~~pl.cs.numeric()

( - ) Subtraction ​

subtraction operator: s1 - s2 (Difference)

fsharp
static member op_Subtraction(l: Selector, r: Selector) : Selector

Parameters

NameTypeDescription
lSelector-
rSelector-

NOTE

Some Polars versions support this as a shorthand for Exclude or Difference


Instance Methods ​

Clone ​

fsharp
member Clone : unit -> Selector

Exclude ​

Exclude columns from a wildcard selection (col("*")).

Exclude columns matching any of the specified Selectors.

Exclude columns matching any of the specified Data Types.

fsharp
member Exclude(names: seq<string>) : Selector
member Exclude(selectors: seq<Selector>) : Selector
member Exclude(dtypes: seq<DataType>) : Selector

Parameters

NameTypeDescription
namesseq<string>-
selectorsseq<Selector>-
dtypesseq<DataType>-

ToExpr ​

Convert the Selector to an Expression. Selectors are essentially dynamic Expressions that expand to column names.

fsharp
member ToExpr : unit -> Expr

Released under the MIT License. Powered by the Polars Rust core & Apache Arrow.