@@ -1670,40 +1670,6 @@ def test_drop_duplicates_for_take_all(self):
16701670 expected = df .iloc [[0 , 1 , 2 , 6 ]]
16711671 assert_frame_equal (result , expected )
16721672
1673- def test_drop_duplicates_deprecated_warning (self ):
1674- df = DataFrame ({'AAA' : ['foo' , 'bar' , 'foo' , 'bar' ,
1675- 'foo' , 'bar' , 'bar' , 'foo' ],
1676- 'B' : ['one' , 'one' , 'two' , 'two' ,
1677- 'two' , 'two' , 'one' , 'two' ],
1678- 'C' : [1 , 1 , 2 , 2 , 2 , 2 , 1 , 2 ],
1679- 'D' : lrange (8 )})
1680- expected = df [:2 ]
1681-
1682- # Raises warning
1683- with tm .assert_produces_warning (False ):
1684- result = df .drop_duplicates (subset = 'AAA' )
1685- assert_frame_equal (result , expected )
1686-
1687- with tm .assert_produces_warning (FutureWarning ):
1688- result = df .drop_duplicates (cols = 'AAA' )
1689- assert_frame_equal (result , expected )
1690-
1691- # Does not allow both subset and cols
1692- self .assertRaises (TypeError , df .drop_duplicates ,
1693- kwargs = {'cols' : 'AAA' , 'subset' : 'B' })
1694-
1695- # Does not allow unknown kwargs
1696- self .assertRaises (TypeError , df .drop_duplicates ,
1697- kwargs = {'subset' : 'AAA' , 'bad_arg' : True })
1698-
1699- # deprecate take_last
1700- # Raises warning
1701- with tm .assert_produces_warning (FutureWarning ):
1702- result = df .drop_duplicates (take_last = False , subset = 'AAA' )
1703- assert_frame_equal (result , expected )
1704-
1705- self .assertRaises (ValueError , df .drop_duplicates , keep = 'invalid_name' )
1706-
17071673 def test_drop_duplicates_tuple (self ):
17081674 df = DataFrame ({('AA' , 'AB' ): ['foo' , 'bar' , 'foo' , 'bar' ,
17091675 'foo' , 'bar' , 'bar' , 'foo' ],
@@ -1960,29 +1926,6 @@ def test_drop_duplicates_inplace(self):
19601926 result = df2
19611927 assert_frame_equal (result , expected )
19621928
1963- def test_duplicated_deprecated_warning (self ):
1964- df = DataFrame ({'AAA' : ['foo' , 'bar' , 'foo' , 'bar' ,
1965- 'foo' , 'bar' , 'bar' , 'foo' ],
1966- 'B' : ['one' , 'one' , 'two' , 'two' ,
1967- 'two' , 'two' , 'one' , 'two' ],
1968- 'C' : [1 , 1 , 2 , 2 , 2 , 2 , 1 , 2 ],
1969- 'D' : lrange (8 )})
1970-
1971- # Raises warning
1972- with tm .assert_produces_warning (False ):
1973- result = df .duplicated (subset = 'AAA' )
1974-
1975- with tm .assert_produces_warning (FutureWarning ):
1976- result = df .duplicated (cols = 'AAA' ) # noqa
1977-
1978- # Does not allow both subset and cols
1979- self .assertRaises (TypeError , df .duplicated ,
1980- kwargs = {'cols' : 'AAA' , 'subset' : 'B' })
1981-
1982- # Does not allow unknown kwargs
1983- self .assertRaises (TypeError , df .duplicated ,
1984- kwargs = {'subset' : 'AAA' , 'bad_arg' : True })
1985-
19861929 # Rounding
19871930
19881931 def test_round (self ):
0 commit comments