def METHOD_NAME(self):
    assert self._monoid is not None
    result = Map(
        columns={
            col_name: replace(
                it[col_name],
                {
                    cat_value: cat_idx
                    for cat_idx, cat_value in enumerate(
                        self._monoid.categories_[col_idx]
                    )
                },
                handle_unknown="use_encoded_value",
                unknown_value=self._hyperparams["unknown_value"],
            )
            for col_idx, col_name in enumerate(self._monoid.feature_names_in_)
        }
    )
    return result