add tag
Pandas merge() method allows me to do inner, outer, left and right joins à la SQL.

How would I proceed, if I wanted to do the EXCEPT SQL command in Pandas? (i.e. set subtraction)

Thanks in advance.
Top Answer
Well, I think I've found an answer...

Let A and B be dataframes.

To do *B-A*, we could run:

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.