Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ENH: option to check merge is one-to-one, many-to-one, one-to-many, or many-to-many #16270
In my experience, there are few places in data work where problems with data are more evident than when merging datasets -- something that is both a problem (if you think you're doing a one-to-one merge and one of the keys isn't unique in one dataset, you can introduce huge problems) and an opportunity (checking that a merge works as expected is a great way to catch problems).
With that in mind, I'd like to propose adding a
(Stata made a similar move to bake this functionality into its merge command around Stata 12 using
Though this functionality can be replicated with user tests, it gets tiring to write them every time...
Thoughts on whether it should check that keys AREN'T unique for the many tests?
i.e. if someone runs