databricks.koalas.Series.sem

Series.sem(axis: Union[int, str] = None, ddof: int = 1, numeric_only: bool = None) → Union[int, float, str, bytes, decimal.Decimal, datetime.date, None, databricks.koalas.series.Series]

Return unbiased standard error of the mean over requested axis.

Parameters
axis{index (0), columns (1)}

Axis for the function to be applied on.

ddofint, default 1

Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements.

numeric_onlybool, default None

Include only float, int, boolean columns. False is not supported. This parameter is mainly for pandas compatibility.

Returns
scalar(for Series) or Series(for DataFrame)

Examples

>>> kdf = ks.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
>>> kdf
   a  b
0  1  4
1  2  5
2  3  6
>>> kdf.sem()
a    0.57735
b    0.57735
dtype: float64
>>> kdf.sem(ddof=0)
a    0.471405
b    0.471405
dtype: float64
>>> kdf.sem(axis=1)
0    1.5
1    1.5
2    1.5
dtype: float64

Support for Series

>>> kser = kdf.a
>>> kser
0    1
1    2
2    3
Name: a, dtype: int64
>>> kser.sem()
0.5773502691896258
>>> kser.sem(ddof=0)
0.47140452079103173