

def validate(self, table):
    column = table.columns[self._column_name]
    if (not isinstance(column.data_type, Number)):
        raise DataTypeError('Variance can only be applied to columns containing Number data.')
    has_nulls = HasNulls(self._column_name).run(table)
    if has_nulls:
        warn_null_calculation(self, column)

dataset/ETHPy150Open wireservice/agate/agate/aggregations/variance.py Variance.validate/original