当前位置: 首页>>代码示例>>Python>>正文


Python nanops.nankurt方法代码示例

本文整理汇总了Python中pandas.core.nanops.nankurt方法的典型用法代码示例。如果您正苦于以下问题:Python nanops.nankurt方法的具体用法?Python nanops.nankurt怎么用?Python nanops.nankurt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pandas.core.nanops的用法示例。


在下文中一共展示了nanops.nankurt方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_nankurt

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def test_nankurt(self):
        from scipy.stats import kurtosis
        func1 = partial(kurtosis, fisher=True)
        func = partial(self._skew_kurt_wrap, func=func1)
        with np.errstate(invalid='ignore'):
            self.check_funs(nanops.nankurt, func, allow_complex=False,
                            allow_str=False, allow_date=False,
                            allow_tdelta=False) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:10,代码来源:test_nanops.py

示例2: test_constant_series

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def test_constant_series(self):
        # xref GH 11974
        for val in [3075.2, 3075.3, 3075.5]:
            data = val * np.ones(300)
            kurt = nanops.nankurt(data)
            assert kurt == 0.0 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:8,代码来源:test_nanops.py

示例3: test_all_finite

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def test_all_finite(self):
        alpha, beta = 0.3, 0.1
        left_tailed = self.prng.beta(alpha, beta, size=100)
        assert nanops.nankurt(left_tailed) < 0

        alpha, beta = 0.1, 0.3
        right_tailed = self.prng.beta(alpha, beta, size=100)
        assert nanops.nankurt(right_tailed) > 0 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:10,代码来源:test_nanops.py

示例4: test_ground_truth

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def test_ground_truth(self):
        kurt = nanops.nankurt(self.samples)
        tm.assert_almost_equal(kurt, self.actual_kurt) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:5,代码来源:test_nanops.py

示例5: test_axis

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def test_axis(self):
        samples = np.vstack([self.samples,
                             np.nan * np.ones(len(self.samples))])
        kurt = nanops.nankurt(samples, axis=1)
        tm.assert_almost_equal(kurt, np.array([self.actual_kurt, np.nan])) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:7,代码来源:test_nanops.py

示例6: test_nans_skipna

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def test_nans_skipna(self):
        samples = np.hstack([self.samples, np.nan])
        kurt = nanops.nankurt(samples, skipna=True)
        tm.assert_almost_equal(kurt, self.actual_kurt) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:6,代码来源:test_nanops.py

示例7: kurt

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def kurt(self, axis=None, dtype=None, out=None, keepdims=False,
             skipna=True):
        nv.validate_stat_ddof_func((), dict(dtype=dtype, out=out,
                                            keepdims=keepdims),
                                   fname='kurt')
        return nanops.nankurt(self._ndarray, axis=axis, skipna=skipna) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:8,代码来源:numpy_.py

示例8: test_nankurt

# 需要导入模块: from pandas.core import nanops [as 别名]
# 或者: from pandas.core.nanops import nankurt [as 别名]
def test_nankurt(self):
        tm.skip_if_no_package('scipy', min_version='0.17.0')
        from scipy.stats import kurtosis
        func1 = partial(kurtosis, fisher=True)
        func = partial(self._skew_kurt_wrap, func=func1)
        with np.errstate(invalid='ignore'):
            self.check_funs(nanops.nankurt, func, allow_complex=False,
                            allow_str=False, allow_date=False,
                            allow_tdelta=False) 
开发者ID:securityclippy,项目名称:elasticintel,代码行数:11,代码来源:test_nanops.py


注:本文中的pandas.core.nanops.nankurt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。