Selector
ColumnSelector
Define generic class for selecting columns based on expressions.
string
string() -> ColumnSelector
Select all columns with a string dtype.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate to filter columns.  | 
          
numeric
numeric() -> ColumnSelector
Select all columns with a numeric dtype.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate to filter columns.  | 
          
temporal
temporal() -> ColumnSelector
Select all columns with a temporal dtype.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate to filter columns.  | 
          
date
date() -> ColumnSelector
Select all columns with a date dtype.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate to filter columns.  | 
          
time
time() -> ColumnSelector
Select all columns with a time dtype.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate to filter columns.  | 
          
interval
interval() -> ColumnSelector
Select all columns with an interval dtype.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate to filter columns.  | 
          
complex
complex() -> ColumnSelector
Select all columns with a complex dtype.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate to filter columns.  | 
          
by_dtype
Select all columns with dtype(s).
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                *dtype
             | 
            
                  DataType
             | 
            
               One or more data types to filter for.  | 
            
                  ()
             | 
          
Returns:
| Type | Description | 
|---|---|
                  Callable
             | 
            
               ColumnSelector predicate filtering for   | 
          
Source code in src/tidy_tools/core/selector.py
              required
required() -> ColumnSelector
Return all non-nullable fields.
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Predicate-based column selecting function.  | 
          
Source code in src/tidy_tools/core/selector.py
              exclude
exclude(*name: str) -> ColumnSelector
Remove all columns with name(s).
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                *name
             | 
            
                  str
             | 
            
               Name of column(s) to exclude.  | 
            
                  ()
             | 
          
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               ColumnSelector predciate filtering for   | 
          
Source code in src/tidy_tools/core/selector.py
              matches
matches(pattern: str) -> ColumnSelector
Selector capturing column names matching the pattern specified.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                pattern
             | 
            
                  str
             | 
            
               Regular expression to match against a column's name.  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Expression filtering for column matching   | 
          
Source code in src/tidy_tools/core/selector.py
              contains
contains(pattern: str) -> ColumnSelector
Selector capturing column names containing the exact pattern specified.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                pattern
             | 
            
                  str
             | 
            
               Regular expression to match against a column's name.  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Expression filtering for column containing   | 
          
Source code in src/tidy_tools/core/selector.py
              starts_with
starts_with(pattern: str) -> ColumnSelector
Selector capturing column names starting with the exact pattern specified.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                pattern
             | 
            
                  str
             | 
            
               Regular expression to match against a column's name.  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Expression filtering for column starting with   | 
          
Source code in src/tidy_tools/core/selector.py
              ends_with
ends_with(pattern: str) -> ColumnSelector
Selector capturing column names ending with the exact pattern specified.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                pattern
             | 
            
                  str
             | 
            
               Regular expression to match against a column's name.  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Expression filtering for column ending with   | 
          
Source code in src/tidy_tools/core/selector.py
              by_name
by_name(*name: str) -> ColumnSelector
Selector capturing column(s) by name.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                *name
             | 
            
                  str
             | 
            
               Name of column(s) to select.  | 
            
                  ()
             | 
          
Returns:
| Type | Description | 
|---|---|
                  ColumnSelector
             | 
            
               Expression filtering for columns with   |