def create_base_covariates(states, covariates_spec):
    """Create set of covariates for each state.

    Parameters
    ----------
    states : pandas.DataFrame
        DataFrame with shape (n_states, n_choices_w_exp + 3) containing period,
        experiences, choice_lagged and type of each state.
    covariates_spec : dict
        Keys represent covariates and values are strings passed to ``df.eval``.

    Returns
    -------
    covariates : pandas.DataFrame
        DataFrame with shape (n_states, n_covariates).

    """
    covariates = states.copy()

    for covariate, definition in covariates_spec.items():
        covariates[covariate] = covariates.eval(definition)

    covariates = covariates.drop(columns=states.columns)

    return covariates