def freqratio(x):
    counted = cunique(x)
    if type(x) == pd.Series:
        try: return counted[0]/counted[1]
        except: return 1
    else:
        empty = []
        for col in columns(x):
            try: empty.append(counted[col].iloc[0]/counted[col].iloc[1])
            except: empty.append(1)
        tab = table(empty); tab.index = columns(x);        return tab[0]