def get_category_to_id_mapping(data, column):
    """Creates two mappings for id and categorical value and vice verse for given column.
    Id is a unique identifier of categorical value. Starting from 0.

    Args:
      data: dataframe that contains categorical values
      column: a column of dataframe that contains categorical values for which a mapping from categorical value
    to id is needed

    Returns:
      id_to_category: dictionary of ids and categories
      category_to_id: dictionary of categories and ids

    """
    categories = sorted(data[column].unique())
    print("There are {} unique categories".format(len(categories)))
    id_to_category = {i: categories[i] for i in range(len(categories))}
    category_to_id = {categories[i]: i for i in range(len(categories))}
    return id_to_category, category_to_id