@@ -931,6 +931,11 @@ def __dataframe__(
931
931
DataFrame interchange object
932
932
The object which consuming library can use to ingress the dataframe.
933
933
934
+ See Also
935
+ --------
936
+ DataFrame.from_records : Constructor from tuples, also record arrays.
937
+ DataFrame.from_dict : From dicts of Series, arrays, or dicts.
938
+
934
939
Notes
935
940
-----
936
941
Details on the interchange protocol:
@@ -12064,14 +12069,92 @@ def kurt(
12064
12069
) -> Series | Any : ...
12065
12070
12066
12071
@deprecate_nonkeyword_arguments (version = "3.0" , allowed_args = ["self" ], name = "kurt" )
12067
- @doc (make_doc ("kurt" , ndim = 2 ))
12068
12072
def kurt (
12069
12073
self ,
12070
12074
axis : Axis | None = 0 ,
12071
12075
skipna : bool = True ,
12072
12076
numeric_only : bool = False ,
12073
12077
** kwargs ,
12074
12078
) -> Series | Any :
12079
+ """
12080
+ Return unbiased kurtosis over requested axis.
12081
+
12082
+ Kurtosis obtained using Fisher's definition of
12083
+ kurtosis (kurtosis of normal == 0.0). Normalized by N-1.
12084
+
12085
+ Parameters
12086
+ ----------
12087
+ axis : {index (0), columns (1)}
12088
+ Axis for the function to be applied on.
12089
+ For `Series` this parameter is unused and defaults to 0.
12090
+
12091
+ For DataFrames, specifying ``axis=None`` will apply the aggregation
12092
+ across both axes.
12093
+
12094
+ .. versionadded:: 2.0.0
12095
+
12096
+ skipna : bool, default True
12097
+ Exclude NA/null values when computing the result.
12098
+ numeric_only : bool, default False
12099
+ Include only float, int, boolean columns.
12100
+
12101
+ **kwargs
12102
+ Additional keyword arguments to be passed to the function.
12103
+
12104
+ Returns
12105
+ -------
12106
+ Series or scalar
12107
+ Unbiased kurtosis over requested axis.
12108
+
12109
+ See Also
12110
+ --------
12111
+ Dataframe.kurtosis : Returns unbiased kurtosis over requested axis.
12112
+
12113
+ Examples
12114
+ --------
12115
+ >>> s = pd.Series([1, 2, 2, 3], index=["cat", "dog", "dog", "mouse"])
12116
+ >>> s
12117
+ cat 1
12118
+ dog 2
12119
+ dog 2
12120
+ mouse 3
12121
+ dtype: int64
12122
+ >>> s.kurt()
12123
+ 1.5
12124
+
12125
+ With a DataFrame
12126
+
12127
+ >>> df = pd.DataFrame(
12128
+ ... {"a": [1, 2, 2, 3], "b": [3, 4, 4, 4]},
12129
+ ... index=["cat", "dog", "dog", "mouse"],
12130
+ ... )
12131
+ >>> df
12132
+ a b
12133
+ cat 1 3
12134
+ dog 2 4
12135
+ dog 2 4
12136
+ mouse 3 4
12137
+ >>> df.kurt()
12138
+ a 1.5
12139
+ b 4.0
12140
+ dtype: float64
12141
+
12142
+ With axis=None
12143
+
12144
+ >>> df.kurt(axis=None).round(6)
12145
+ -0.988693
12146
+
12147
+ Using axis=1
12148
+
12149
+ >>> df = pd.DataFrame(
12150
+ ... {"a": [1, 2], "b": [3, 4], "c": [3, 4], "d": [1, 2]},
12151
+ ... index=["cat", "dog"],
12152
+ ... )
12153
+ >>> df.kurt(axis=1)
12154
+ cat -6.0
12155
+ dog -6.0
12156
+ dtype: float64
12157
+ """
12075
12158
result = super ().kurt (
12076
12159
axis = axis , skipna = skipna , numeric_only = numeric_only , ** kwargs
12077
12160
)
0 commit comments