def _create_embedding(series):
    """Create a one-hot encoding embedding.

    Args:
        series: A DataFrame series (column).

    Returns:
        dict: Mapping of the entries (or "<None>") to the index number.

    """
    types = sorted(series.unique().tolist())
    assert "<None>" not in types
    emb_index = dict(zip(["<None>"] + types, range(len(types) + 1)))
    return emb_index