{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/14355","repository_url":"https://api.github.com/repos/pydata/pandas","labels_url":"https://api.github.com/repos/pydata/pandas/issues/14355/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/14355/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/14355/events","html_url":"https://github.com/pydata/pandas/issues/14355","id":181162218,"number":14355,"title":"ENH: Support merging DataFrames on a combination of columns and index levels","user":{"login":"jmmease","id":15064365,"avatar_url":"https://avatars.githubusercontent.com/u/15064365?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmease","html_url":"https://github.com/jmmease","followers_url":"https://api.github.com/users/jmmease/followers","following_url":"https://api.github.com/users/jmmease/following{/other_user}","gists_url":"https://api.github.com/users/jmmease/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmease/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmease/subscriptions","organizations_url":"https://api.github.com/users/jmmease/orgs","repos_url":"https://api.github.com/users/jmmease/repos","events_url":"https://api.github.com/users/jmmease/events{/privacy}","received_events_url":"https://api.github.com/users/jmmease/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/API%20Design","name":"API Design","color":"AD7FA8"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Compat","name":"Compat","color":"0052cc"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Enhancement","name":"Enhancement","color":"4E9A06"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Master%20Tracker","name":"Master Tracker","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-05T14:00:26Z","updated_at":"2016-10-10T12:46:43Z","closed_at":null,"body":"- [ ] ``.groupby`` #5677\r\n- [ ] ``.sort_values`` #14353, though this is directly in combat with ``.sort_index`` and non-explict\r\n- [ ] ``.merge`` (this issue)\r\n\r\n#### Overview\r\n@jorisvandenbossche \r\nAs a part of the [Pandas 1.0](https://docs.google.com/document/d/151ct8jcZWwh7XStptjbLsda6h2b3C0IuiH_hfZnUA58/edit#) goal to \"Make the index/column distinction less painful (#5677, #8162)\" I propose that the `df.merge` method support merging DataFrames on a combination of columns and index levels.\r\n\r\nThis could be accomplished in the API by allowing the `on`, `left_on`, and `right_on` keywords to accept a combination of column names and index level names.  Any index levels that are joined on would be preserved as index levels in the resulting merged DataFrame, while all other index levels would be removed.\r\n\r\nThis proposal is in the spirit of #5677 for `df.groupby`  and #14353 for `df.sort_values`.\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/252608626","html_url":"https://github.com/pydata/pandas/issues/14355#issuecomment-252608626","issue_url":"https://api.github.com/repos/pydata/pandas/issues/14355","id":252608626,"user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars.githubusercontent.com/u/1020496?v=3","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T12:46:43Z","updated_at":"2016-10-10T12:46:43Z","body":"+1 on this proposal. As I said in the related issue (https://github.com/pydata/pandas/issues/14353#issuecomment-251911933), would be nice to have a general solution for this, but for now enabling this behaviour for specific functions/keywords is fine for me.\r\n\r\n@jreback @wesm @TomAugspurger @shoyer @sinhrks @chris-b1 any concerns of feedback regarding this proposal, before work is done to implement it? (@jmmease you plan to tackle this if OK?)"}}
{"actor":{"display_login":"jorisvandenbossche"}}