def list_days(data):
    """List the days in the database

    :arg data: the database. data is expected to have a column
    called day with datetimes Y-M-D
    :type data: pandas dataframe

    :returns: data_days, days
    data_days is a grouped dataframe, grouped by the day
    days is a list of the days in data
    """
    data_days = data.groupby(data.day)
    days = list(data_days.groups.keys())
    return data_days, days