Selectors#

Contains method to select columns in a dataframe. See the selectors section for further details.

selectors.Selector

Pattern for matching columns in a dataframe.

selectors.all

Select all columns in a dataframe.

selectors.any_date

Select columns that have a Date or Datetime data type.

selectors.boolean

Select columns that have a Boolean data type.

selectors.cardinality_below

Select columns whose cardinality (number of unique values) is (strictly) below threshold.

selectors.categorical

Select columns that have a Categorical (or polars Enum) data type.

selectors.cols

Select columns by name.

selectors.drop

Select the columns of a dataframe that are NOT matched by the selector.

selectors.filter

Select columns for which a custom predicate function returns True.

selectors.filter_names

Select columns based only on their name.

selectors.float

Select columns that have a floating-point data type (float32, float64, etc.)

selectors.glob

Select columns by name with Unix shell style 'glob' pattern.

selectors.has_dtype

Select columns whose dtype is equal to one of the provided dtypes.

selectors.has_nulls

Select columns that contain at least one null value, or a proportion of null values above a given threshold.

selectors.integer

Select columns that have an integer data type.

selectors.inv

Invert a selector.

selectors.make_selector

Normalize a selector, column name, or list of names into a Selector object.

selectors.numeric

Select columns that have a numeric data type.

selectors.object

Select columns whose dtype is object (pandas) or pl.Object (polars).

selectors.regex

Select columns by name with a regular expression.

selectors.select

Select the columns of a dataframe that are matched by the selector.

selectors.string

Select columns that have a string data type.