def cokurt(df, bias=False, fisher=True, variant='middle'):
    v = df.values
s1 = sigma = v.std(0, keepdims=True)
means = v.mean(0, keepdims=True)
v1 = v - means
s2 = sigma ** 2
s3 = sigma ** 3
v2 = v1 ** 2
v3 = v1 ** 3
m = v.shape[0]
if variant in ['left', 'right']:
    kurt = pd.DataFrame(v3.T.dot(v1) / s3.T.dot(s1) / m, df.columns, df.columns
        )
if variant == 'right':
    kurt = kurt.T
elif variant == 'middle':
    kurt = pd.DataFrame(v2.T.dot(v2) / s2.T.dot(s2) / m, df.columns, df.columns
        )
if not bias:
    kurt = kurt * (m ** 2 - 1) / (m - 2) / (m - 3) - 3 * (m - 1) ** 2 / (m - 2
        ) / (m - 3)
if not fisher:
    kurt += 3
return kurt
как рассчитать косой перекос и кокуртоз