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

Function test_diff

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

Source from the content-addressed store, hash-verified

1590
1591
1592def test_diff():
1593 df = DataFrame({"a": [1, 2, 3], "b": 1.5})
1594
1595 result = df.diff()
1596 assert result.index is not df.index
1597 assert result.columns is not df.columns
1598
1599 ser = Series([1, 2, 3])
1600 result = ser.diff()
1601 assert result.index is not ser.index

Callers

nothing calls this directly

Calls 4

diffMethod · 0.95
diffMethod · 0.95
DataFrameClass · 0.90
SeriesClass · 0.90

Tested by

no test coverage detected