Esempio n. 1
0
 def test_col_does_not_exist(self):
     df = pd.DataFrame({'a': [1, 2, 3]})
     with self.assertRaises(ValueError):
         ensure_col_exists(df, 'b', 'my_df')
Esempio n. 2
0
 def test_col_does_not_exist(self):
     df = pd.DataFrame({'a': [1, 2, 3]})
     with self.assertRaises(ValueError):
         ensure_col_exists(df, 'b', 'my_df')
Esempio n. 3
0
 def test_col_exists(self):
     df = pd.DataFrame({'a': [1, 2, 3]})
     ensure_col_exists(df, 'a')
Esempio n. 4
0
 def test_col_exists(self):
     df = pd.DataFrame({'a': [1, 2, 3]})
     ensure_col_exists(df, 'a')