def test_insert(): with test_csv.bayesdb_csv_stream(test_csv.csv_data) as (bdb, f): bayeslite.bayesdb_read_csv(bdb, 't', f, header=True, create=True) guess.bayesdb_guess_generator(bdb, 't_cc', 't', 'crosscat') bdb.execute('initialize 2 models for t_cc') bdb.execute('analyze t_cc for 1 iteration wait') generator_id = core.bayesdb_get_generator(bdb, 't_cc') row = (41, 'F', 96000, 73, 'data science', 2) bqlfn.bayesdb_insert(bdb, generator_id, row)
def test_insert(): with test_csv.bayesdb_csv_stream(test_csv.csv_data) as (bdb, f): bayeslite.bayesdb_read_csv(bdb, "t", f, header=True, create=True) guess.bayesdb_guess_generator(bdb, "t_cc", "t", "crosscat") bdb.execute("initialize 2 models for t_cc") bdb.execute("analyze t_cc for 1 iteration wait") generator_id = core.bayesdb_get_generator(bdb, "t_cc") row = (41, "F", 96000, 73, "data science", 2) bqlfn.bayesdb_insert(bdb, generator_id, row)