Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pandas/tests/frame/methods/test_equals.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ def test_dataframe_not_equal(self):
df2 = DataFrame({"a": ["s", "d"], "b": [1, 2]})
assert df1.equals(df2) is False

def test_equals_object_array_vs_scalar(self):
# GH#43867 one object-dtype element is a numpy array, the other a
# scalar; these must not compare equal
df = DataFrame({"x": ["a"]}, dtype=object)
other = df.copy()
other["x"] = [np.array(["a"], dtype=object)]
assert df["x"].dtype == other["x"].dtype == object
assert not df.equals(other)
assert not other.equals(df)

def test_equals_different_blocks(self):
# GH#9330
df0 = DataFrame(
Expand Down
Loading