|
10 | 10 |
|
11 | 11 | from pandas import Series, DataFrame, bdate_range, Panel
|
12 | 12 | from pandas.core.indexes.datetimes import DatetimeIndex
|
13 |
| -from pandas.errors import PerformanceWarning |
14 | 13 | from pandas.tseries.offsets import BDay
|
15 | 14 | from pandas.util import testing as tm
|
16 | 15 | from pandas.compat import lrange
|
@@ -461,33 +460,28 @@ def test_set_value(self):
|
461 | 460 | # ok, as the index gets converted to object
|
462 | 461 | frame = self.frame.copy()
|
463 | 462 | with tm.assert_produces_warning(FutureWarning,
|
464 |
| - check_stacklevel=False, |
465 |
| - ignore_extra=True): |
| 463 | + check_stacklevel=False): |
466 | 464 | res = frame.set_value('foobar', 'B', 1.5)
|
467 | 465 | assert res.index.dtype == 'object'
|
468 | 466 |
|
469 | 467 | res = self.frame
|
470 | 468 | res.index = res.index.astype(object)
|
471 | 469 |
|
472 | 470 | with tm.assert_produces_warning(FutureWarning,
|
473 |
| - check_stacklevel=False, |
474 |
| - ignore_extra=True): |
| 471 | + check_stacklevel=False): |
475 | 472 | res = self.frame.set_value('foobar', 'B', 1.5)
|
476 | 473 | assert res.index[-1] == 'foobar'
|
477 | 474 | with tm.assert_produces_warning(FutureWarning,
|
478 |
| - check_stacklevel=False, |
479 |
| - ignore_extra=True): |
| 475 | + check_stacklevel=False): |
480 | 476 | assert res.get_value('foobar', 'B') == 1.5
|
481 | 477 |
|
482 | 478 | with tm.assert_produces_warning(FutureWarning,
|
483 |
| - check_stacklevel=False, |
484 |
| - ignore_extra=True): |
| 479 | + check_stacklevel=False): |
485 | 480 | res2 = res.set_value('foobar', 'qux', 1.5)
|
486 | 481 | tm.assert_index_equal(res2.columns,
|
487 | 482 | pd.Index(list(self.frame.columns)))
|
488 | 483 | with tm.assert_produces_warning(FutureWarning,
|
489 |
| - check_stacklevel=False, |
490 |
| - ignore_extra=True): |
| 484 | + check_stacklevel=False): |
491 | 485 | assert res2.get_value('foobar', 'qux') == 1.5
|
492 | 486 |
|
493 | 487 | def test_fancy_index_misc(self):
|
@@ -594,9 +588,8 @@ def test_setitem_chained_no_consolidate(self):
|
594 | 588 | # issuecomment-361696418
|
595 | 589 | # chained setitem used to cause consolidation
|
596 | 590 | sdf = pd.SparseDataFrame([[np.nan, 1], [2, np.nan]])
|
597 |
| - with tm.assert_produces_warning(PerformanceWarning): |
598 |
| - with pd.option_context('mode.chained_assignment', None): |
599 |
| - sdf[0][1] = 2 |
| 591 | + with pd.option_context('mode.chained_assignment', None): |
| 592 | + sdf[0][1] = 2 |
600 | 593 | assert len(sdf._data.blocks) == 2
|
601 | 594 |
|
602 | 595 | def test_delitem(self):
|
|
0 commit comments