replace_variable_value_labels#

Survey.replace_variable_value_labels(mapping: dict, column_selection: str | int | list | ndarray | Series | range | Callable[[SurveyVariable], bool] | None = None)#

Replace variable value labels according to the dictionary mapping.

Parameter#

mappingdict

A dictionary containing items (value, new_label).

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().