Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the What you really need to know section for the big picture.

julearn.base.ColumnTypes

class julearn.base.ColumnTypes(column_types)

Class to hold types in regards to a pd.DataFrame Column.

Parameters:

column_types (list[str] | set[str] | str | ColumnTypes) – One str representing on type if columns or a list of these. Instead of a str you can also provide a ColumnTypes itself.

__init__(column_types)
add(column_types)

Add more column_types to the column_types.

Parameters:

column_types (list[str] | set[str] | str | ColumnTypes) – One str representing on type if columns or a list of these. Instead of a str you can also provide a ColumnTypes itself.

Returns:

The updates ColumnTypes.

property pattern: str

Get the pattern/regex that matches all the column types.

to_type_selector()

Create a type selector from the ColumnType.

The type selector is usable by sklearn.compose.ColumnTransformer

Returns:

The type selector.

filter(X_types)

Filter the X_types based on the column_types.

Parameters:

X_types (dict[str, Any]) – The types of the columns.

Returns:

The filtered X_types.

copy()

Get a copy of the ColumnTypes.

Returns:

The copy of the ColumnTypes.