import six


def column_info(df):
    """Returns a list of columns and their datatypes

    Args:
        df (`pandas.DataFrame`): The dataframe to get info for

    Returns:
        :type:`list` of :type:`dict`: A list of dicts containing column ids and their
            Dtypes
    """

    column_info = []
    for column_name, data_type in six.iteritems(df.dtypes):
        temp = {'id': column_name, 'dtype': str(data_type)}
        column_info.append(temp)

    return column_info