set_variable_types#

Survey.set_variable_types(types: str | list | ndarray, column_selection: str | int | list | ndarray | Series | range | Callable[[SurveyVariable], bool] | None = None, suppress_check_var_warning=True)#

Set the type of the variables specified by column_selection.

Parameters#

types: str, list or np.ndarray

If type is a string, a single variable type name. Otherwise a list of variable type names. Typical types are ‘numerical’, ‘ordinal’, and ‘nominal’.

column_selectionstr, int, list, np.ndarray, pd.Series, range, QuestionSelector or None

If None, all columns are taken into account. Otherwise, a subset will be considered. The parameter is interpreted as described in Survey.interpret_column_selection().

suppress_check_var_warningbool

If True, don’t show a warning if there are ‘unusable’ variables. A variable is unusable, if we can not automatically create features for the corresponding question.