コード例 #1
0
def test_head_compute():
    data = tm.makeMixedDataFrame()
    t = symbol('t', discover(data))
    db = into('sqlite:///:memory:::t', data, dshape=t.dshape)
    n = 2
    d = Data(db)

    # skip the header and the ... at the end of the repr
    expr = d.head(n)
    s = repr(expr)
    assert '...' not in s
    result = s.split('\n')[1:]
    assert len(result) == n
コード例 #2
0
ファイル: test_interactive.py プロジェクト: postelrich/blaze
def test_head_compute():
    data = tm.makeMixedDataFrame()
    t = symbol('t', discover(data))
    db = into('sqlite:///:memory:::t', data, dshape=t.dshape)
    n = 2
    d = Data(db)

    # skip the header and the ... at the end of the repr
    expr = d.head(n)
    s = repr(expr)
    assert '...' not in s
    result = s.split('\n')[1:]
    assert len(result) == n
コード例 #3
0
ファイル: test_interactive.py プロジェクト: postelrich/blaze
def test_highly_nested_repr():
    data = [[0, [[1, 2], [3]], 'abc']]
    d = Data(data)
    assert 'abc' in repr(d.head())
コード例 #4
0
ファイル: test_interactive.py プロジェクト: menghaozhu/hat
def test_highly_nested_repr():
    data = [[0, [[1, 2], [3]], 'abc']]
    d = Data(data)
    assert 'abc' in repr(d.head())
コード例 #5
0
ファイル: test_interactive.py プロジェクト: gyenney/Tools
def test_highly_nested_repr():
    data = [[0, [[1, 2], [3]], "abc"]]
    d = Data(data)
    assert "abc" in repr(d.head())