@@ -718,7 +718,7 @@ def test_stat_op_api(self, float_frame, float_string_frame):
718
718
assert_stat_op_api ('median' , float_frame , float_string_frame )
719
719
720
720
try :
721
- from scipy .stats import skew , kurtosis
721
+ from scipy .stats import skew , kurtosis # noqa:F401
722
722
assert_stat_op_api ('skew' , float_frame , float_string_frame )
723
723
assert_stat_op_api ('kurt' , float_frame , float_string_frame )
724
724
except ImportError :
@@ -739,19 +739,19 @@ def var(x):
739
739
return np .var (x , ddof = 1 )
740
740
741
741
def std (x ):
742
- return x : np .std (x , ddof = 1 )
742
+ return np .std (x , ddof = 1 )
743
743
744
744
def sem (x ):
745
745
return np .std (x , ddof = 1 ) / np .sqrt (len (x ))
746
746
747
- def skew (x ):
748
- from scipy .stats import skew
747
+ def skewness (x ):
748
+ from scipy .stats import skew # noqa:F811
749
749
if len (x ) < 3 :
750
750
return np .nan
751
751
return skew (x , bias = False )
752
752
753
753
def kurt (x ):
754
- from scipy .stats import kurtosis
754
+ from scipy .stats import kurtosis # noqa:F811
755
755
if len (x ) < 4 :
756
756
return np .nan
757
757
return kurtosis (x , bias = False )
@@ -770,20 +770,18 @@ def kurt(x):
770
770
check_dates = True )
771
771
assert_stat_op_calc ('product' , np .prod , float_frame_with_na )
772
772
773
-
774
773
assert_stat_op_calc ('mad' , mad , float_frame_with_na )
775
774
assert_stat_op_calc ('var' , var , float_frame_with_na )
776
775
assert_stat_op_calc ('std' , std , float_frame_with_na )
777
776
assert_stat_op_calc ('sem' , sem , float_frame_with_na )
778
777
779
-
780
778
assert_stat_op_calc ('count' , count , float_frame_with_na ,
781
779
has_skipna = False , check_dtype = False ,
782
780
check_dates = True )
783
781
784
782
try :
785
- from scipy import skew , kurtosis
786
- assert_stat_op_calc ('skew' , skew , float_frame_with_na )
783
+ from scipy import skew , kurtosis # noqa:F401
784
+ assert_stat_op_calc ('skew' , skewness , float_frame_with_na )
787
785
assert_stat_op_calc ('kurt' , kurt , float_frame_with_na )
788
786
except ImportError :
789
787
pass
0 commit comments