當前位置: 首頁>>代碼示例>>Python>>正文


Python nanops.nanskew方法代碼示例

本文整理匯總了Python中pandas.core.nanops.nanskew方法的典型用法代碼示例。如果您正苦於以下問題:Python nanops.nanskew方法的具體用法?Python nanops.nanskew怎麽用?Python nanops.nanskew使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pandas.core.nanops的用法示例。


在下文中一共展示了nanops.nanskew方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_nanskew

# 需要導入模塊: from pandas.core import nanops [as 別名]
# 或者: from pandas.core.nanops import nanskew [as 別名]
def test_nanskew(self):
        from scipy.stats import skew
        func = partial(self._skew_kurt_wrap, func=skew)
        with np.errstate(invalid='ignore'):
            self.check_funs(nanops.nanskew, func, allow_complex=False,
                            allow_str=False, allow_date=False,
                            allow_tdelta=False) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:9,代碼來源:test_nanops.py

示例2: test_constant_series

# 需要導入模塊: from pandas.core import nanops [as 別名]
# 或者: from pandas.core.nanops import nanskew [as 別名]
def test_constant_series(self):
        # xref GH 11974
        for val in [3075.2, 3075.3, 3075.5]:
            data = val * np.ones(300)
            skew = nanops.nanskew(data)
            assert skew == 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 nanskew [as 別名]
def test_all_finite(self):
        alpha, beta = 0.3, 0.1
        left_tailed = self.prng.beta(alpha, beta, size=100)
        assert nanops.nanskew(left_tailed) < 0

        alpha, beta = 0.1, 0.3
        right_tailed = self.prng.beta(alpha, beta, size=100)
        assert nanops.nanskew(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 nanskew [as 別名]
def test_ground_truth(self):
        skew = nanops.nanskew(self.samples)
        tm.assert_almost_equal(skew, self.actual_skew) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:5,代碼來源:test_nanops.py

示例5: test_axis

# 需要導入模塊: from pandas.core import nanops [as 別名]
# 或者: from pandas.core.nanops import nanskew [as 別名]
def test_axis(self):
        samples = np.vstack([self.samples,
                             np.nan * np.ones(len(self.samples))])
        skew = nanops.nanskew(samples, axis=1)
        tm.assert_almost_equal(skew, np.array([self.actual_skew, 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 nanskew [as 別名]
def test_nans_skipna(self):
        samples = np.hstack([self.samples, np.nan])
        skew = nanops.nanskew(samples, skipna=True)
        tm.assert_almost_equal(skew, self.actual_skew) 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:6,代碼來源:test_nanops.py

示例7: skew

# 需要導入模塊: from pandas.core import nanops [as 別名]
# 或者: from pandas.core.nanops import nanskew [as 別名]
def skew(self, axis=None, dtype=None, out=None, keepdims=False,
             skipna=True):
        nv.validate_stat_ddof_func((), dict(dtype=dtype, out=out,
                                            keepdims=keepdims),
                                   fname='skew')
        return nanops.nanskew(self._ndarray, axis=axis, skipna=skipna)

    # ------------------------------------------------------------------------
    # Additional Methods 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:11,代碼來源:numpy_.py

示例8: test_nanskew

# 需要導入模塊: from pandas.core import nanops [as 別名]
# 或者: from pandas.core.nanops import nanskew [as 別名]
def test_nanskew(self):
        tm.skip_if_no_package('scipy', min_version='0.17.0')
        from scipy.stats import skew
        func = partial(self._skew_kurt_wrap, func=skew)
        with np.errstate(invalid='ignore'):
            self.check_funs(nanops.nanskew, func, allow_complex=False,
                            allow_str=False, allow_date=False,
                            allow_tdelta=False) 
開發者ID:securityclippy,項目名稱:elasticintel,代碼行數:10,代碼來源:test_nanops.py


注:本文中的pandas.core.nanops.nanskew方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。