def varcheck(x, freq = "mean", unq = 0.1, colour = True, limit = True, output = False):
    freqs = freqratio(x); unqs = punique(x)
    if freq == "mean": fd = (freqs>=CI(q=0.99,data =freqs,L=False))*1
    else: fd = (freqs>freq)*1
    df = hcat(freqs,fd,unqs,(unqs<=unq)*1,var(x))
    df.columns = ["FreqRatio","BadFreq?","%Unique","BadUnq?","Var"]
    df["BadVar?"] = (df["Var"].fillna(1000)<=0.1)*1
    df["BAD?"] = (df["BadFreq?"]+df["BadUnq?"]+df["BadVar?"])>0
    df = round(sort(df, by =["BAD?","BadVar?","BadFreq?","BadUnq?","FreqRatio","%Unique","Var"], des = True),2)