BUG: (iloc) Comparisons of Series have different indexing semantics from DataFrame comparisons #4581
Labels
Bug
Error Reporting
Incorrect or improved errors from pandas
Indexing
Related to indexing on series/frames, not to indexes themselves
Milestone
Consider the following:
Obviously, the ne operator uses positional indexing when comparing the values and applies the index of the first argument to the result. I don't think this is the expected behaviour.
Again, the semantics are different when performing addition:
Here, everything works as expected.
I also tried the dataframe ne method:
This works as expected, and differently from Series comparisons. The respective method doesn't exist for Series objects, so I couldn't test that.
The text was updated successfully, but these errors were encountered: