Skip to content

Commit 9183b50

Browse files
committed
Lint, isort, fixes
1 parent d49b742 commit 9183b50

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

pandas/core/generic.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -4208,14 +4208,21 @@ def update(self, other, join='left', overwrite=True, filter_func=None,
42084208
If 'raise', will raise a ValueError if the DataFrame and `other`
42094209
both contain non-NA data in the same place.
42104210
4211-
Raises
4212-
------
4213-
ValueError
4214-
When `errors='ignore'` and there's overlapping non-NA data.
4211+
.. versionchanged :: 0.24.0
4212+
Changed from `raise_conflict=False|True`
4213+
to `errors='ignore'|'raise'`.
42154214
42164215
Returns
42174216
-------
4218-
Nothing, the object is modified inplace.
4217+
None : method directly changes calling object
4218+
4219+
Raises
4220+
------
4221+
ValueError
4222+
* When `errors='raise'` and there's overlapping non-NA data.
4223+
* When `errors` is not either `'ignore'` or `'raise'`
4224+
NotImplementedError
4225+
* If `join != 'left'`
42194226
42204227
See Also
42214228
--------

pandas/core/missing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def update_array(this, that, overwrite=True, filter_func=None,
116116
dict.update : Similar method for `dict`.
117117
"""
118118
updated = _update_array(this, that, overwrite=overwrite,
119-
filter_func=filter_func, errors=errors)
119+
filter_func=filter_func, errors=errors)
120120
return this if updated is None else updated
121121

122122

pandas/tests/series/test_combine_concat.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
from datetime import datetime
55

66
import numpy as np
7-
from numpy import nan
87
import pytest
98

109
import pandas as pd
1110
from pandas import DataFrame, DatetimeIndex, Series, compat, date_range
1211
import pandas.util.testing as tm
13-
from pandas.util.testing import assert_series_equal, assert_frame_equal
12+
from pandas.util.testing import assert_frame_equal, assert_series_equal
1413

1514

1615
class TestSeriesCombine():
@@ -170,7 +169,7 @@ def test_update_raise(self):
170169
s = Series([0, 1, 2, np.nan, np.nan, 5, 6, np.nan])
171170
other = Series([1, 3, np.nan, 7, 9], index=[1, 3, 5, 7, 9])
172171

173-
with tm.assert_raises_regex(ValueError, "Data overlaps"):
172+
with pytest.raises(ValueError, match="Data overlaps"):
174173
s.update(other, errors='raise')
175174

176175
def test_concat_empty_series_dtypes_roundtrips(self):

pandas/tests/test_panel.py

-1
Original file line numberDiff line numberDiff line change
@@ -2358,7 +2358,6 @@ def test_update_raise_on_overlap(self):
23582358
[[1.5, np.nan, 3.], [1.5, np.nan, 3.],
23592359
[1.5, np.nan, 3.],
23602360
[1.5, np.nan, 3.]]])
2361-
other = Panel([[[]]])
23622361

23632362
with pytest.raises(ValueError, match='Data overlaps'):
23642363
pan.update(pan, errors='raise')

0 commit comments

Comments
 (0)