MCPcopy
hub / github.com/pandas-dev/pandas / test_update_series

Function test_update_series

pandas/tests/copy_view/test_methods.py:1409–1420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1407
1408
1409def test_update_series():
1410 ser1 = Series([1.0, 2.0, 3.0])
1411 ser2 = Series([100.0], index=[1])
1412 ser1_orig = ser1.copy()
1413 view = ser1[:]
1414
1415 ser1.update(ser2)
1416
1417 expected = Series([1.0, 100.0, 3.0])
1418 tm.assert_series_equal(ser1, expected)
1419 # ser1 is updated, but its view not
1420 tm.assert_series_equal(view, ser1_orig)
1421
1422
1423def test_update_chained_assignment():

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
SeriesClass · 0.90
copyMethod · 0.45

Tested by

no test coverage detected