예제 #1
0
 def test_test_table_primary_keys(self):
     fl = FactoryLoader()
     df = fl.load("test")
     self.assertTrue(df.id.is_unique)
     self.assertFalse(df.id.hasnans)
     self.assertEqual(df[["date", "store_nbr", "item_nbr"]].drop_duplicates().shape[0], df.shape[0])
     self.assertFalse(df.date.hasnans)
     self.assertFalse(df.store_nbr.hasnans)
     self.assertFalse(df.item_nbr.hasnans)
예제 #2
0
 def test_transactions_table_primary_keys(self):
     fl = FactoryLoader()
     df = fl.load("transactions")
     self.assertEqual(df[["date", "store_nbr"]].drop_duplicates().shape[0], df.shape[0])
     self.assertFalse(df.date.hasnans)
     self.assertFalse(df.store_nbr.hasnans)
예제 #3
0
 def test_stores_table_primary_keys(self):
     fl = FactoryLoader()
     df = fl.load("stores")
     self.assertTrue(df.store_nbr.is_unique)
     self.assertFalse(df.store_nbr.hasnans)
예제 #4
0
 def test_items_table_shape(self):
     fl = FactoryLoader()
     df = fl.load("items")
     self.assertEqual((4100, 3), df.shape)
예제 #5
0
 def test_oil_table_primary_keys(self):
     fl = FactoryLoader()
     df = fl.load("oil")
     self.assertTrue(df.date.is_unique)
     self.assertFalse(df.date.hasnans)
예제 #6
0
 def test_transactions_table_shape(self):
     fl = FactoryLoader()
     df = fl.load("transactions")
     self.assertEqual((83488, 3), df.shape)
예제 #7
0
 def test_holidays_events_table_primary_keys(self):
     fl = FactoryLoader()
     df = fl.load("holidays_events")
     self.assertTrue(df.date.is_unique)
     self.assertFalse(df.date.hasnans)
예제 #8
0
 def test_train_table_shape(self):
     fl = FactoryLoader()
     df = fl.load("train")
     self.assertEqual((125497040, 6), df.shape)
예제 #9
0
 def test_test_table_shape(self):
     fl = FactoryLoader()
     df = fl.load("test")
     self.assertEqual((3370464, 5), df.shape)
예제 #10
0
 def test_stores_table_shape(self):
     fl = FactoryLoader()
     df = fl.load("stores")
     self.assertEqual((54, 5), df.shape)
예제 #11
0
 def test_oil_table_shape(self):
     fl = FactoryLoader()
     df = fl.load("oil")
     self.assertEqual((1175, 2), df.shape)
예제 #12
0
 def test_holidays_events_table_shape(self):
     fl = FactoryLoader()
     df = fl.load("holidays_events")
     self.assertEqual((312, 6), df.shape)