===============================================================================0
>>> with open("../read.py", "rt", encoding="utf8") as fp: exec(fp.read())
>>> with open("../freq.py", "rt", encoding="utf8") as fp: exec(fp.read())
>>> iris = read("../data/iris.xlsx")
>>> toothgrowth = read("../data/toothgrowth.txt", textfileparamsdict={"sep": "\t"})
===============================================================================1
测试DataFrame对象
>>> res = freq(toothgrowth)
>>> print(res)
===============================================================================2
测试DataFrame对象，频率统计
>>> res = freq(toothgrowth, normalize=1)
>>> print(res)
===============================================================================3
测试DataFrame对象，不排序
>>> res = freq(toothgrowth, sort=0)
>>> print(res)
===============================================================================4
测试DataFrame对象，升序排列
>>> res = freq(toothgrowth, ascending=1)
>>> print(res)
===============================================================================5
测试DataFrame对象，指定列
>>> res = freq(toothgrowth, subset="supp")
>>> print(res)
===============================================================================6
测试Series对象
>>> res = freq(iris["Species"])
>>> print(res)
===============================================================================7
测试Series对象，频率统计
>>> res = freq(iris["Sepal.Length"], normalize=1)
>>> print(res)
===============================================================================8
测试Series对象，不排序
>>> res = freq(iris["Sepal.Length"], sort=0)
>>> print(res)
===============================================================================9
测试Series对象，升序排列
>>> res = freq(iris["Sepal.Length"], ascending=1)
>>> print(res)
===============================================================================10
测试Series对象，等距分组为5组
>>> res = freq(iris["Sepal.Length"], ascending=1, bins=5)
>>> print(res)
===============================================================================11
