def test_discretize_a_row(self): results = discretize_data.discretize_row({'col1':5,'col2':10.1, 'col3':15},[ 7, 4, 11, 10], 'col2') self.assertEqual(results, ['True','True','False','True'])
def test_discretize_a_row_that_contains_nans(self): results = discretize_data.discretize_row({'col1':5,'col2':10.1, 'col3':15},[ 'nan', 7, 4, 11, 10, 20, 'nan'], 'col2') self.assertEqual(results, ['False','True','True','False','True','False','False'])