Ejemplo n.º 1
0
def test_vis_collection_set_intent():
    df = pd.read_csv("https://github.com/lux-org/lux-datasets/blob/master/data/olympic.csv?raw=true")
    vlist = VisList(["Height", "SportType=Ice", "?"], df)
    vlist.set_intent(["Height", "SportType=Boat", "?"])
    for v in vlist._collection:
        filter_vspec = list(filter(lambda x: x.channel == "", v._inferred_intent))[0]
        assert filter_vspec.value == "Boat"
Ejemplo n.º 2
0
def test_vis_collection_set_intent(global_var):
    df = pytest.olympic
    vlist = VisList(["Height", "SportType=Ice", "?"], df)
    vlist.set_intent(["Height", "SportType=Boat", "?"])
    for v in vlist._collection:
        filter_vspec = list(filter(lambda x: x.channel == "", v._inferred_intent))[0]
        assert filter_vspec.value == "Boat"
    df.clear_intent()
Ejemplo n.º 3
0
def test_vis_collection_set_intent():
    df = pd.read_csv("lux/data/olympic.csv")
    from lux.vis.VisList import VisList
    vc = VisList(["Height", "SportType=Ice", "?"], df)
    vc.set_intent(["Height", "SportType=Boat", "?"])
    for v in vc.collection:
        filter_vspec = list(
            filter(lambda x: x.channel == "", v._inferred_intent))[0]
        assert filter_vspec.value == "Boat"