예제 #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')
예제 #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')
예제 #3
0
 def test_col_exists(self):
     df = pd.DataFrame({'a': [1, 2, 3]})
     ensure_col_exists(df, 'a')
예제 #4
0
 def test_col_exists(self):
     df = pd.DataFrame({'a': [1, 2, 3]})
     ensure_col_exists(df, 'a')