captest.capdata.CapData.custom_param

CapData.custom_param(func, *args, **kwargs)

Applies the function func with kwargs and adds result as new column to data.

Calculates and adds a new column to data using the function func with the provided arguments and keyword arguments. See the functions in the calcparams module for examples.

Called by util.process_reg_cols to add new columns to the data attribute while recursively processing and updating the regression_cols attribute.

Parameters:

func (function) – Function that takes a DataFrame as its first argument and returns a Series.

Returns:

Adds a new column to the data attribute.

Return type:

None