eland.DataFrame.var#

DataFrame.var(numeric_only: Optional[bool] = None) Series#

Return variance for each numeric column

Parameters#

numeric_only: {True, False, None} Default is None

Which datatype to be returned - True: Returns all values as float64, NaN/NaT values are removed - None: Returns all values as the same dtype where possible, NaN/NaT are removed - False: Returns all values as the same dtype where possible, NaN/NaT are preserved

Returns#

pandas.Series

The value of the variance for each numeric column

See Also#

pandas.DataFrame.var

Examples#

>>> df = ed.DataFrame('http://localhost:9200', 'flights', columns=["AvgTicketPrice", "Cancelled", "dayOfWeek", "timestamp", "DestCountry"])
>>> df.var()  
AvgTicketPrice    70964.570234
Cancelled             0.111987
dayOfWeek             3.761279
dtype: float64
>>> df.var(numeric_only=True)
AvgTicketPrice    70964.570234
Cancelled             0.111987
dayOfWeek             3.761279
dtype: float64
>>> df.var(numeric_only=False)  
AvgTicketPrice     70964.6
Cancelled         0.111987
dayOfWeek          3.76128
timestamp              NaT
DestCountry            NaN
dtype: object