File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -10082,11 +10082,7 @@ def update(
1008210082
1008310083 index_intersection = other.index.intersection(self.index)
1008410084 if index_intersection.empty:
10085- raise ValueError(
10086- "Update not allowed when the index on `other` has no intersection "
10087- "with this dataframe."
10088- )
10089-
10085+ return
1009010086 other = other.reindex(index_intersection)
1009110087 this_data = self.loc[index_intersection]
1009210088
Original file line number Diff line number Diff line change @@ -215,12 +215,13 @@ def test_update_raises_on_duplicate_argument_index(self):
215215 with pytest .raises (ValueError , match = "duplicate index" ):
216216 df .update (other )
217217
218- def test_update_raises_without_intersection (self ):
219- # GH#55509
220- df = DataFrame ({"a" : [1 ]}, index = [1 ])
218+ def test_update_without_intersection (self ):
219+ # GH#63452
220+ orig = DataFrame ({"a" : [1 ]}, index = [1 ])
221+ df = orig .copy ()
221222 other = DataFrame ({"a" : [2 ]}, index = [2 ])
222- with pytest . raises ( ValueError , match = "no intersection" ):
223- df . update ( other )
223+ df . update ( other )
224+ tm . assert_frame_equal ( df , orig )
224225
225226 def test_update_on_duplicate_frame_unique_argument_index (self ):
226227 # GH#55509
You can’t perform that action at this time.
0 commit comments