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

Function test_diff

pandas/tests/arrays/categorical/test_algos.py:79–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78
79def test_diff():
80 ser = pd.Series([1, 2, 3], dtype="category")
81
82 msg = "Convert to a suitable dtype"
83 with pytest.raises(TypeError, match=msg):
84 ser.diff()
85
86 df = ser.to_frame(name="A")
87 with pytest.raises(TypeError, match=msg):
88 df.diff()
89
90
91def test_hash_read_only_categorical():

Callers

nothing calls this directly

Calls 3

diffMethod · 0.95
to_frameMethod · 0.95
raisesMethod · 0.45

Tested by

no test coverage detected