def get_label(data):
    """Small utility to grab label information from different types of data sources

    Parameters:
        data: Tidy (long-form) dataframe where each column is a variable and each row is an
            observation. Pandas dataframe or numpy array

    Returns:
        label (str): the name of the column

    .. codeauthor:: pygeostat development team
    """
    label = None
    if hasattr(data, 'columns'):
        if len(data.columns) == 1:
            label = data.columns[0]
    if hasattr(data, 'name'):
        label = data.name

    return label