def do_scan(file, cols):
    table = ds.dataset(file, format=format_).to_table(use_threads=False)
    table = table.flatten()
    print(table.num_rows)
    val1 = pc.stddev(table.column(4))
    val2 = pc.variance(table.column(4))
    val3 = pc.mean(table.column(4))
    val4 = pc.sum(table.column(4))
Esempio n. 2
0
def test_variance():
    data = [1, 2, 3, 4, 5, 6, 7, 8]
    assert pc.variance(data).as_py() == 5.25
    assert pc.variance(data, ddof=0).as_py() == 5.25
    assert pc.variance(data, ddof=1).as_py() == 6.0