PandasRegistry

Contents

PandasRegistry#

class liesel_gam.PandasRegistry(data, na_action='error', prefix_names_by='')[source]#

Bases: object

Registry for managing variables and their transformations.

Handles conversion from pandas.DataFrame to liesel.Var objects, applies transformations, and caches results for efficiency.

Methods

get_boolean_obs

Get a variable and ensure it is boolean.

get_calc

Get a derived version of the variable.

get_calc_centered

Get a centered version of the variable: x - mean(x).

get_calc_dummymatrix

Get dummy matrix for a categorical column using standard dummy coding.

get_calc_standardized

Get a standardized version of the variable: (x - mean(x)) / std(x).

get_categorical_obs

Get a variable and ensure it is categorical.

get_numeric_obs

Get a variable and ensure it is numeric.

get_obs

Get or create a liesel Var for a data column.

get_obs_and_mapping

Get an observed variable.

is_boolean

Check if a variable is boolean.

is_categorical

Check if a variable is categorical.

is_numeric

Check if a variable is numeric.

Attributes

columns

Get list of available column names.

shape

Get shape of the data after NA handling.