def pandas_obj(values, *axes):
    """ return a pandas object adapted to the dimensions of values
    """
    try:
        import pandas as pd
    except ImportError:
        raise ImportError('install pandas to use this method')
    pandas_classes = [pd.Series, pd.DataFrame, pd.Panel]
    n = pd.np.array(values).ndim
    if n > len(pandas_classes):
        raise Exception('No pandas class matches that dimension: ' + str(n))
    elif n == 0:
        return values
    else:
        cls = pandas_classes[n - 1]
        return cls(values, *axes)
