{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/13637","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/13637/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/13637/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/13637/events","html_url":"https://github.com/pandas-dev/pandas/issues/13637","id":165233792,"node_id":"MDU6SXNzdWUxNjUyMzM3OTI=","number":13637,"title":"API: Index/Series/DataFrame op 1-d list-like coercion","user":{"login":"sinhrks","id":1696302,"node_id":"MDQ6VXNlcjE2OTYzMDI=","avatar_url":"https://avatars1.githubusercontent.com/u/1696302?v=4","gravatar_id":"","url":"https://api.github.com/users/sinhrks","html_url":"https://github.com/sinhrks","followers_url":"https://api.github.com/users/sinhrks/followers","following_url":"https://api.github.com/users/sinhrks/following{/other_user}","gists_url":"https://api.github.com/users/sinhrks/gists{/gist_id}","starred_url":"https://api.github.com/users/sinhrks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sinhrks/subscriptions","organizations_url":"https://api.github.com/users/sinhrks/orgs","repos_url":"https://api.github.com/users/sinhrks/repos","events_url":"https://api.github.com/users/sinhrks/events{/privacy}","received_events_url":"https://api.github.com/users/sinhrks/received_events","type":"User","site_admin":false},"labels":[{"id":35818298,"node_id":"MDU6TGFiZWwzNTgxODI5OA==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/API%20Design","name":"API Design","color":"AD7FA8","default":false,"description":null},{"id":47223669,"node_id":"MDU6TGFiZWw0NzIyMzY2OQ==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Numeric","name":"Numeric","color":"006b75","default":false,"description":"Arithmetic, Comparison, Logical, and Reduction operations"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pandas-dev/pandas/milestones/16","html_url":"https://github.com/pandas-dev/pandas/milestone/16","labels_url":"https://api.github.com/repos/pandas-dev/pandas/milestones/16/labels","id":174211,"node_id":"MDk6TWlsZXN0b25lMTc0MjEx","number":16,"title":"1.0","description":"","creator":{"login":"wesm","id":329591,"node_id":"MDQ6VXNlcjMyOTU5MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/329591?v=4","gravatar_id":"","url":"https://api.github.com/users/wesm","html_url":"https://github.com/wesm","followers_url":"https://api.github.com/users/wesm/followers","following_url":"https://api.github.com/users/wesm/following{/other_user}","gists_url":"https://api.github.com/users/wesm/gists{/gist_id}","starred_url":"https://api.github.com/users/wesm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesm/subscriptions","organizations_url":"https://api.github.com/users/wesm/orgs","repos_url":"https://api.github.com/users/wesm/repos","events_url":"https://api.github.com/users/wesm/events{/privacy}","received_events_url":"https://api.github.com/users/wesm/received_events","type":"User","site_admin":false},"open_issues":60,"closed_issues":1814,"state":"open","created_at":"2012-09-13T02:13:00Z","updated_at":"2020-01-02T17:27:07Z","due_on":"2020-02-01T08:00:00Z","closed_at":null},"comments":9,"created_at":"2016-07-13T04:15:37Z","updated_at":"2020-01-02T17:53:06Z","closed_at":null,"author_association":"MEMBER","body":"xref #1134. There is another inconsistencies related to op. `Index/Series/DataFrame` op can accept 1-d list-like as input and coercing to `Index/Series`. However, supported 1-d list-likes differ depending on the class and kind of op.\n#### Code Sample, a copy-pastable example if possible\n\n```\n# Series + equal length list, OK\npd.Series([1, 2, 3]) + [2, 2, 2]\n#0    3\n#1    4\n#2    5\n# dtype: int64\n\n# Series + equal length Index, OK\npd.Series([1, 2, 3]) + pd.Index([2, 2, 2])\n#0    3\n#1    4\n#2    5\n# dtype: int64\n\n# DataFrame + equal length list, OK\npd.DataFrame([[1, 2, 3]]) + [2, 2, 2]\n#    0  1  2\n#0  3  4  5\n\n# DataFrame + equal length Index, NG\npd.DataFrame([[1, 2, 3]]) + pd.Index([2, 2, 2])\n# ValueError: cannot evaluate a numeric op with unequal lengths\n```\n\nI've organize the result once as the below table. I think all these must be supported and consistent.\n\n| Class | op | list | tuple | ndarray(1dim) | Index |\n| --- | --- | --- | --- | --- | --- |\n| Index | Arithmetic | x | x | o | o |\n| Index | Comparison | o | o | o | o |\n| Index | Boolean | o | o | o | o |\n| Series | Arithmetic | o | o | o | o |\n| Series | Comparison | o | o | o | o |\n| Series | Boolean | o | o | o | x |\n| Frame | Arithmetic | o | o | o | x |\n| Frame | Comparison | o | o | o | o |\n| Frame | Boolean | o | o | o | x |\n\nNOTE: Index result may depends on its type.\n#### output of `pd.show_versions()`\n\n0.18.1\n"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/570286348","html_url":"https://github.com/pandas-dev/pandas/issues/13637#issuecomment-570286348","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/13637","id":570286348,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MDI4NjM0OA==","user":{"login":"jbrockmendel","id":8078968,"node_id":"MDQ6VXNlcjgwNzg5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/8078968?v=4","gravatar_id":"","url":"https://api.github.com/users/jbrockmendel","html_url":"https://github.com/jbrockmendel","followers_url":"https://api.github.com/users/jbrockmendel/followers","following_url":"https://api.github.com/users/jbrockmendel/following{/other_user}","gists_url":"https://api.github.com/users/jbrockmendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrockmendel/subscriptions","organizations_url":"https://api.github.com/users/jbrockmendel/orgs","repos_url":"https://api.github.com/users/jbrockmendel/repos","events_url":"https://api.github.com/users/jbrockmendel/events{/privacy}","received_events_url":"https://api.github.com/users/jbrockmendel/received_events","type":"User","site_admin":false},"created_at":"2020-01-02T17:53:06Z","updated_at":"2020-01-02T17:53:06Z","author_association":"MEMBER","body":"I think these are in good enough shape not to be a blocker, but not in good enough shape to close.  Ideally I'd like to work this into something like unpack_zerodim_and_defer to make sure we have a consistent implementation"}}
{"actor":{"display_login":"jbrockmendel"}}