def coskew(df, bias=False):
    v = df.values
s1 = sigma = v.std(0, keepdims=True)
means = v.mean(0, keepdims=True)
v1 = v - means
s2 = sigma ** 2
v2 = v1 ** 2
m = v.shape[0]
skew = pd.DataFrame(v2.T.dot(v1) / s2.T.dot(s1) / m, df.columns, df.columns)
if not bias:
    skew *= ((m - 1) * m) ** 0.5 / (m - 2)
return skew
how to calculate coskew and cokurtosis