def test_load_meat(self): meat = load_meat() self.assertEqual(len(meat), 827) self.assertEqual(list(meat.columns), ["date", "beef", "veal", "pork", "lamb_and_mutton", "broilers", "other_chicken", "turkey"])
def test_datetime_query(self): meat = load_meat() result = SQLDF(locals()).execute("select * from meat limit 10;") self.assertEqual(len(result), 10)
#pip install pysqldf from pysqldf import SQLDF, load_meat, load_births sqldf = SQLDF(globals()) meat = load_meat() births = load_births() print(sqldf.execute("SELECT * FROM meat LIMIT 10;").head())