()
| 77 | |
| 78 | |
| 79 | def 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 | |
| 91 | def test_hash_read_only_categorical(): |