@@ -906,21 +906,23 @@ def skew(self, **kwargs):
906
906
907
907
Parameters
908
908
----------
909
- kwargs : Under Review
909
+ **kwargs
910
+ Under Review.
910
911
911
912
Returns
912
913
-------
913
- Series or DataFrame (matches input)
914
- Like-indexed object containing the result of function application
914
+ Series or DataFrame
915
+ Returned object type is determined by the caller of the %(name)s
916
+ calculation
915
917
916
918
See Also
917
919
--------
918
- pandas. Series.%(name)s
919
- pandas. DataFrame.%(name)s
920
- pandas. Series.kurtosis
921
- pandas. DataFrame.kurtosis
922
- scipy.stats.skew
923
- scipy.stats.kurtosis
920
+ Series.%(name)s : Calling object with Series data
921
+ DataFrame.%(name)s : Calling object with DataFrames
922
+ Series.kurt : Equivalent method for Series
923
+ DataFrame.kurt : Equivalent method for DataFrame
924
+ scipy.stats.skew : Third moment of a probability density
925
+ scipy.stats.kurtosis : Reference SciPy method
924
926
925
927
Notes
926
928
-----
@@ -932,19 +934,20 @@ def skew(self, **kwargs):
932
934
four matching the equivalent function call using `scipy.stats`.
933
935
934
936
>>> arr = [1, 2, 3, 4, 999]
937
+ >>> fmt = "{0:.6f}" # limit the printed precision to 6 digits
935
938
>>> import scipy.stats
936
- >>> print("{0:.6f}" .format(scipy.stats.kurtosis(arr[:-1], bias=False)))
939
+ >>> print(fmt .format(scipy.stats.kurtosis(arr[:-1], bias=False)))
937
940
-1.200000
938
- >>> print("{0:.6f}" .format(scipy.stats.kurtosis(arr[1:], bias=False)))
941
+ >>> print(fmt .format(scipy.stats.kurtosis(arr[1:], bias=False)))
939
942
3.999946
940
- >>> df = pd.DataFrame (arr)
941
- >>> df .rolling(4).kurt()
942
- 0
943
- 0 NaN
944
- 1 NaN
945
- 2 NaN
946
- 3 -1.200000
947
- 4 3.999946
943
+ >>> s = pd.Series (arr)
944
+ >>> s .rolling(4).kurt()
945
+ 0 NaN
946
+ 1 NaN
947
+ 2 NaN
948
+ 3 -1.200000
949
+ 4 3.999946
950
+ dtype: float64
948
951
""" )
949
952
950
953
def kurt (self , ** kwargs ):
0 commit comments