Пример #1
0
    def test_mad_outliers_reject(self):
        rows = [ 
            (50, 4, 'a'),
        ] * 10
            
        rows.append((200, 1, 'b'))
        
        table = Table(rows, self.column_types, self.column_names)

        new_table = table.mad_outliers('one', reject=True)

        self.assertEqual(len(new_table.rows), 1)
        self.assertSequenceEqual(new_table.columns['one'], (200,))
Пример #2
0
    def test_mad_outliers_reject(self):
        rows = [
            (50, 4, 'a'),
        ] * 10

        rows.append((200, 1, 'b'))

        table = Table(rows, self.column_types, self.column_names)

        new_table = table.mad_outliers('one', reject=True)

        self.assertEqual(len(new_table.rows), 1)
        self.assertSequenceEqual(new_table.columns['one'], (200, ))
Пример #3
0
    def test_mad_outliers(self):
        rows = [ 
            (50, 4, 'a'),
        ] * 10
            
        rows.append((200, 1, 'b'))
        
        table = Table(rows, self.column_types, self.column_names)

        new_table = table.mad_outliers('one')

        self.assertEqual(len(new_table.rows), 10)
        self.assertNotIn(200, new_table.columns['one'])
Пример #4
0
    def test_mad_outliers(self):
        rows = [
            (50, 4, 'a'),
        ] * 10

        rows.append((200, 1, 'b'))

        table = Table(rows, self.column_types, self.column_names)

        new_table = table.mad_outliers('one')

        self.assertEqual(len(new_table.rows), 10)
        self.assertNotIn(200, new_table.columns['one'])