assert_series_equal and assert_frame_equal are inconsistent #18389
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Log output
Issue description
The test first creates two DataFrames. Each of them contains a single column of datatype list of struct and a single row. One list contains a
Null
element whereas the other one contains a struct with allNull
values. All other elements are the same.assert_frame_not_equal
correctly confirms that the two DataFrames differ.assert_series_not_equal
falsely assumes that the Series that where used to build the DataFrame are the same.This is a contradiction.
Expected behavior
The most consistent expected behavior seems to be to treat
Null
and a struct with allNull
-fields as two different things, in the same way asassert_frame_not_equal
is already doing it.The test should pass.
Installed versions
The text was updated successfully, but these errors were encountered: