@disallow('<STR_LIT>', '<STR_LIT>')<EOL>def nankurt(values, axis=None, skipna=True, mask=None):
values = com.values_from_object(values)<EOL>if mask is None:<EOL><INDENT>mask = isna(values)<EOL><DEDENT>if not is_float_dtype(values.dtype):<EOL><INDENT>values = values.astype('<STR_LIT>')<EOL>count = _get_counts(mask, axis)<EOL><DEDENT>else:<EOL><INDENT>count = _get_counts(mask, axis, dtype=values.dtype)<EOL><DEDENT>if skipna:<EOL><INDENT>values = values.copy()<EOL>np.putmask(values, mask, <NUM_LIT:0>)<EOL><DEDENT>mean = values.sum(axis, dtype=np.float64) / count<EOL>if axis is not None:<EOL><INDENT>mean = np.expand_dims(mean, axis)<EOL><DEDENT>adjusted = values - mean<EOL>if skipna:<EOL><INDENT>np.putmask(adjusted, mask, <NUM_LIT:0>)<EOL><DEDENT>adjusted2 = adjusted ** <NUM_LIT:2><EOL>adjusted4 = adjusted2 ** <NUM_LIT:2><EOL>m2 = adjusted2.sum(axis, dtype=np.float64)<EOL>m4 = adjusted4.sum(axis, dtype=np.float64)<EOL>with np.errstate(invalid='<STR_LIT:ignore>', divide='<STR_LIT:ignore>'):<EOL><INDENT>adj = <NUM_LIT:3> * (count - <NUM_LIT:1>) ** <NUM_LIT:2> / ((count - <NUM_LIT:2>) * (count - <NUM_LIT:3>))<EOL>numer = count * (count + <NUM_LIT:1>) * (count - <NUM_LIT:1>) * m4<EOL>denom = (count - <NUM_LIT:2>) * (count - <NUM_LIT:3>) * m2 ** <NUM_LIT:2><EOL><DEDENT>numer = _zero_out_fperr(numer)<EOL>denom = _zero_out_fperr(denom)<EOL>if not isinstance(denom, np.ndarray):<EOL><INDENT>if count < <NUM_LIT:4>:<EOL><INDENT>return np.nan<EOL><DEDENT>if denom == <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT><DEDENT>with np.errstate(invalid='<STR_LIT:ignore>', divide='<STR_LIT:ignore>'):<EOL><INDENT>result = numer / denom - adj<EOL><DEDENT>dtype = values.dtype<EOL>if is_float_dtype(dtype):<EOL><INDENT>result = result.astype(dtype)<EOL><DEDENT>if isinstance(result, np.ndarray):<EOL><INDENT>result = np.where(denom == <NUM_LIT:0>, <NUM_LIT:0>, result)<EOL>result[count < <NUM_LIT:4>] = np.nan<EOL><DEDENT>return result<EOL>
Compute the sample excess kurtosis

The statistic computed here is the adjusted Fisher-Pearson standardized
moment coefficient G2, computed directly from the second and fourth
central moment.

Parameters
----------
values : ndarray
axis: int, optional
skipna : bool, default True
mask : ndarray[bool], optional
    nan-mask if known

Returns
-------
result : float64
    Unless input is a float array, in which case use the same
    precision as the input array.

Examples
--------
>>> import pandas.core.nanops as nanops
>>> s = pd.Series([1,np.nan, 1, 3, 2])
>>> nanops.nankurt(s)
-1.2892561983471076