def skewness(r):
    '\n    Alternative to scipy.stats.skew()\n    Computes the skewness of the supplied Series or DataFrame\n    Returns a float or a Series\n    '
    r = r[((r != 0) & r.notnull())]
    demeaned_r = (r - r.mean())
    sigma_r = r.std(ddof=0)
    exp = (demeaned_r ** 3).mean()
    return (exp / (sigma_r ** 3))
Alternative to scipy.stats.skew()
Computes the skewness of the supplied Series or DataFrame
Returns a float or a Series
def skewness(r):
    '\n    Alternative to scipy.stats.skew()\n    Computes the skewness of the supplied Series or DataFrame\n    Returns a float or a Series\n    '
    r = r[((r != 0) & r.notnull())]
    demeaned_r = (r - r.mean())
    sigma_r = r.std(ddof=0)
    exp = (demeaned_r ** 3).mean()
    return (exp / (sigma_r ** 3))