bigframes.pandas.DataFrame.var#
- DataFrame.var(axis:str|int=0,*,numeric_only:bool=False)→Series[source]#
Return unbiased variance over requested axis.
Normalized by N-1 by default.
Examples:
>>>df=bpd.DataFrame({"A":[1,3],"B":[2,4]})>>>df A B0 1 21 3 4[2 rows x 2 columns]
Calculating the variance of each column (the default behavior without an explicit axis parameter).
>>>df.var()A 2.0B 2.0dtype: Float64
Calculating the variance of each row.
>>>df.var(axis=1)0 0.51 0.5dtype: Float64
- Parameters:
axis ({index (0),columns (1)}) – Axis for the function to be applied on.For Series this parameter is unused and defaults to 0.
numeric_only (bool. default False) – Default False. Include only float, int, boolean columns.
- Returns:
Series with unbiased variance over requested axis.
- Return type:
On this page