{"action":"created","comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments/173636308","pull_request_review_id":102864102,"id":173636308,"diff_hunk":"@@ -3122,23 +3125,67 @@ def isin(self, values, level=None):\n \n             .. versionadded:: 0.18.1\n \n-            Support for values as a set\n+            Support for values as a set.\n \n-        level : str or int, optional\n+        level : str or int, optional in the case of Index, compulsory on\n+            MultiIndex\n             Name or position of the index level to use (if the index is a\n             MultiIndex).\n \n+        Returns\n+        -------\n+        is_contained : ndarray (boolean dtype)\n+\n+        See also\n+        --------\n+        DatetimeIndex.isin : an Index of :class:`Datetime` s\n+        TimedeltaIndex : an Index of :class:`Timedelta` s\n+        PeriodIndex : an Index of :class:`Period` s\n+        MultiIndex.isin : Same for `MultiIndex`\n+        NumericIndex.isin : Same for `Int64Index`, `UInt64Index`,\n+                            `Float64Index`\n+\n         Notes\n         -----\n         If `level` is specified:\n \n         - if it is the name of one *and only one* index level, use that level;\n         - otherwise it should be a number indicating level position.\n \n-        Returns\n-        -------\n-        is_contained : ndarray (boolean dtype)\n+        Examples\n+        --------\n+        >>> idx = pd.Index([1,2,3])\n+        >>> idx\n+        Int64Index([1, 2, 3], dtype='int64')\n+\n+        Check whether a value is in the Index:\n+        >>> idx.isin([1])\n+        array([ True, False, False])\n+\n+        >>> midx = pd.MultiIndex.from_arrays([[1,2,3],\n+        ...                                    ['red','blue','green']],\n+        ...                                    names=('number', 'color'))\n+        >>> midx\n+        MultiIndex(levels=[[1, 2, 3], ['blue', 'green', 'red']],\\\n+ labels=[[0, 1, 2], [2, 0, 1]],\\\n+ names=['number', 'color'])\n+\n+        Check whether a string index value is in the 'color' level of the\n+        MultiIndex:\n+\n+        >>> midx.isin(['red'],'color')\n+        array([ True, False, False])\n+\n+        >>> dates = ['3/11/2000', '3/12/2000', '3/13/2000']\n+        >>> dti = pd.to_datetime(dates)\n+        >>> dti\n+        DatetimeIndex(['2000-03-11', '2000-03-12', '2000-03-13'],\\\n+ dtype='datetime64[ns]', freq=None)","path":"pandas/core/indexes/base.py","position":77,"original_position":77,"commit_id":"bf6307bbc55980d3fb36d75751bc52c711dbe4d3","original_commit_id":"bf6307bbc55980d3fb36d75751bc52c711dbe4d3","user":{"login":"TomAugspurger","id":1312546,"avatar_url":"https://avatars3.githubusercontent.com/u/1312546?v=4","gravatar_id":"","url":"https://api.github.com/users/TomAugspurger","html_url":"https://github.com/TomAugspurger","followers_url":"https://api.github.com/users/TomAugspurger/followers","following_url":"https://api.github.com/users/TomAugspurger/following{/other_user}","gists_url":"https://api.github.com/users/TomAugspurger/gists{/gist_id}","starred_url":"https://api.github.com/users/TomAugspurger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomAugspurger/subscriptions","organizations_url":"https://api.github.com/users/TomAugspurger/orgs","repos_url":"https://api.github.com/users/TomAugspurger/repos","events_url":"https://api.github.com/users/TomAugspurger/events{/privacy}","received_events_url":"https://api.github.com/users/TomAugspurger/received_events","type":"User","site_admin":false},"body":"formatting","created_at":"2018-03-10T21:57:29Z","updated_at":"2018-03-10T21:57:52Z","html_url":"https://github.com/pandas-dev/pandas/pull/20249#discussion_r173636308","pull_request_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments/173636308"},"html":{"href":"https://github.com/pandas-dev/pandas/pull/20249#discussion_r173636308"},"pull_request":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249"}}},"pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249","id":174190989,"html_url":"https://github.com/pandas-dev/pandas/pull/20249","diff_url":"https://github.com/pandas-dev/pandas/pull/20249.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/20249.patch","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20249","number":20249,"state":"open","locked":false,"title":"DOC: update the Index.isin docstring","user":{"login":"noemielteto","id":37245938,"avatar_url":"https://avatars2.githubusercontent.com/u/37245938?v=4","gravatar_id":"","url":"https://api.github.com/users/noemielteto","html_url":"https://github.com/noemielteto","followers_url":"https://api.github.com/users/noemielteto/followers","following_url":"https://api.github.com/users/noemielteto/following{/other_user}","gists_url":"https://api.github.com/users/noemielteto/gists{/gist_id}","starred_url":"https://api.github.com/users/noemielteto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noemielteto/subscriptions","organizations_url":"https://api.github.com/users/noemielteto/orgs","repos_url":"https://api.github.com/users/noemielteto/repos","events_url":"https://api.github.com/users/noemielteto/events{/privacy}","received_events_url":"https://api.github.com/users/noemielteto/received_events","type":"User","site_admin":false},"body":"Checklist for the pandas documentation sprint (ignore this if you are doing\r\nan unrelated PR):\r\n\r\n- [x] PR title is \"DOC: update the <your-function-or-method> docstring\"\r\n- [x] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`\r\n- [x] The PEP8 style check passes: `git diff upstream/master -u -- \"*.py\" | flake8 --diff`\r\n- [x] The html version looks good: `python doc/make.py --single <your-function-or-method>`\r\n- [x] It has been proofread on language by another sprint participant\r\n\r\nPlease include the output of the validation script below between the \"```\" ticks:\r\n\r\n```\r\n\r\n################################################################################\r\n######################## Docstring (pandas.Index.isin)  ########################\r\n################################################################################\r\n\r\nBoolean array on existence of index values in `values`.\r\n\r\nCompute boolean array of whether each index value is found in the\r\npassed set of values. Length of the returned boolean array matches\r\nthe length of the index.\r\n\r\nParameters\r\n----------\r\nvalues : set or list-like\r\n    Sought values.\r\n\r\n    .. versionadded:: 0.18.1\r\n\r\n    Support for values as a set.\r\n\r\nlevel : str or int, optional in the case of Index, compulsory on\r\n    MultiIndex\r\n    Name or position of the index level to use (if the index is a\r\n    MultiIndex).\r\n\r\nReturns\r\n-------\r\nis_contained : ndarray (boolean dtype)\r\n\r\nSee also\r\n--------\r\nDatetimeIndex.isin : an Index of :class:`Datetime` s\r\nTimedeltaIndex : an Index of :class:`Timedelta` s\r\nPeriodIndex : an Index of :class:`Period` s\r\nMultiIndex.isin : Same for `MultiIndex`\r\nNumericIndex.isin : Same for `Int64Index`, `UInt64Index`,\r\n                    `Float64Index`\r\n\r\nNotes\r\n-----\r\nIf `level` is specified:\r\n\r\n- if it is the name of one *and only one* index level, use that level;\r\n- otherwise it should be a number indicating level position.\r\n\r\nExamples\r\n--------\r\n>>> idx = pd.Index([1,2,3])\r\n>>> idx\r\nInt64Index([1, 2, 3], dtype='int64')\r\n\r\nCheck whether a value is in the Index:\r\n>>> idx.isin([1])\r\narray([ True, False, False])\r\n\r\n>>> midx = pd.MultiIndex.from_arrays([[1,2,3],\r\n...                                    ['red','blue','green']],\r\n...                                    names=('number', 'color'))\r\n>>> midx\r\nMultiIndex(levels=[[1, 2, 3], ['blue', 'green', 'red']], labels=[[0, 1, 2], [2, 0, 1]], names=['number', 'color'])\r\n\r\nCheck whether a string index value is in the 'color' level of the\r\nMultiIndex:\r\n\r\n>>> midx.isin(['red'],'color')\r\narray([ True, False, False])\r\n\r\n>>> dates = ['3/11/2000', '3/12/2000', '3/13/2000']\r\n>>> dti = pd.to_datetime(dates)\r\n>>> dti\r\nDatetimeIndex(['2000-03-11', '2000-03-12', '2000-03-13'], dtype='datetime64[ns]', freq=None)\r\n\r\nCheck whether a datetime index value is in the DatetimeIndex:\r\n\r\n>>> dti.isin(['3/11/2000'])\r\narray([ True, False, False])\r\n\r\n################################################################################\r\n################################## Validation ##################################\r\n################################################################################\r\n\r\nDocstring for \"pandas.Index.isin\" correct. :)\r\n```\r\n\r\nIf the validation script still gives errors, but you think there is a good reason\r\nto deviate in this case (and there are certainly such cases), please state this\r\nexplicitly.\r\n","created_at":"2018-03-10T21:42:26Z","updated_at":"2018-03-10T21:57:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b29115eb71aeea2b71d9627d0f3caf0ed29f3444","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249/commits","review_comments_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249/comments","review_comment_url":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20249/comments","statuses_url":"https://api.github.com/repos/pandas-dev/pandas/statuses/bf6307bbc55980d3fb36d75751bc52c711dbe4d3","head":{"label":"noemielteto:updating_Index.isin_docstring","ref":"updating_Index.isin_docstring","sha":"bf6307bbc55980d3fb36d75751bc52c711dbe4d3","user":{"login":"noemielteto","id":37245938,"avatar_url":"https://avatars2.githubusercontent.com/u/37245938?v=4","gravatar_id":"","url":"https://api.github.com/users/noemielteto","html_url":"https://github.com/noemielteto","followers_url":"https://api.github.com/users/noemielteto/followers","following_url":"https://api.github.com/users/noemielteto/following{/other_user}","gists_url":"https://api.github.com/users/noemielteto/gists{/gist_id}","starred_url":"https://api.github.com/users/noemielteto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noemielteto/subscriptions","organizations_url":"https://api.github.com/users/noemielteto/orgs","repos_url":"https://api.github.com/users/noemielteto/repos","events_url":"https://api.github.com/users/noemielteto/events{/privacy}","received_events_url":"https://api.github.com/users/noemielteto/received_events","type":"User","site_admin":false},"repo":{"id":124667540,"name":"pandas","full_name":"noemielteto/pandas","owner":{"login":"noemielteto","id":37245938,"avatar_url":"https://avatars2.githubusercontent.com/u/37245938?v=4","gravatar_id":"","url":"https://api.github.com/users/noemielteto","html_url":"https://github.com/noemielteto","followers_url":"https://api.github.com/users/noemielteto/followers","following_url":"https://api.github.com/users/noemielteto/following{/other_user}","gists_url":"https://api.github.com/users/noemielteto/gists{/gist_id}","starred_url":"https://api.github.com/users/noemielteto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noemielteto/subscriptions","organizations_url":"https://api.github.com/users/noemielteto/orgs","repos_url":"https://api.github.com/users/noemielteto/repos","events_url":"https://api.github.com/users/noemielteto/events{/privacy}","received_events_url":"https://api.github.com/users/noemielteto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noemielteto/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":true,"url":"https://api.github.com/repos/noemielteto/pandas","forks_url":"https://api.github.com/repos/noemielteto/pandas/forks","keys_url":"https://api.github.com/repos/noemielteto/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noemielteto/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noemielteto/pandas/teams","hooks_url":"https://api.github.com/repos/noemielteto/pandas/hooks","issue_events_url":"https://api.github.com/repos/noemielteto/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/noemielteto/pandas/events","assignees_url":"https://api.github.com/repos/noemielteto/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/noemielteto/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/noemielteto/pandas/tags","blobs_url":"https://api.github.com/repos/noemielteto/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noemielteto/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noemielteto/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/noemielteto/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noemielteto/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/noemielteto/pandas/languages","stargazers_url":"https://api.github.com/repos/noemielteto/pandas/stargazers","contributors_url":"https://api.github.com/repos/noemielteto/pandas/contributors","subscribers_url":"https://api.github.com/repos/noemielteto/pandas/subscribers","subscription_url":"https://api.github.com/repos/noemielteto/pandas/subscription","commits_url":"https://api.github.com/repos/noemielteto/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/noemielteto/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/noemielteto/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/noemielteto/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/noemielteto/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/noemielteto/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noemielteto/pandas/merges","archive_url":"https://api.github.com/repos/noemielteto/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noemielteto/pandas/downloads","issues_url":"https://api.github.com/repos/noemielteto/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/noemielteto/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/noemielteto/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/noemielteto/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noemielteto/pandas/labels{/name}","releases_url":"https://api.github.com/repos/noemielteto/pandas/releases{/id}","deployments_url":"https://api.github.com/repos/noemielteto/pandas/deployments","created_at":"2018-03-10T15:17:16Z","updated_at":"2018-03-10T15:17:23Z","pushed_at":"2018-03-10T21:39:19Z","git_url":"git://github.com/noemielteto/pandas.git","ssh_url":"git@github.com:noemielteto/pandas.git","clone_url":"https://github.com/noemielteto/pandas.git","svn_url":"https://github.com/noemielteto/pandas","homepage":"http://pandas.pydata.org","size":117994,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pandas-dev:master","ref":"master","sha":"fb556ed64cd0e905e31fe39723a8a4bca9cb112d","user":{"login":"pandas-dev","id":21206976,"avatar_url":"https://avatars2.githubusercontent.com/u/21206976?v=4","gravatar_id":"","url":"https://api.github.com/users/pandas-dev","html_url":"https://github.com/pandas-dev","followers_url":"https://api.github.com/users/pandas-dev/followers","following_url":"https://api.github.com/users/pandas-dev/following{/other_user}","gists_url":"https://api.github.com/users/pandas-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pandas-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandas-dev/subscriptions","organizations_url":"https://api.github.com/users/pandas-dev/orgs","repos_url":"https://api.github.com/users/pandas-dev/repos","events_url":"https://api.github.com/users/pandas-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pandas-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":858127,"name":"pandas","full_name":"pandas-dev/pandas","owner":{"login":"pandas-dev","id":21206976,"avatar_url":"https://avatars2.githubusercontent.com/u/21206976?v=4","gravatar_id":"","url":"https://api.github.com/users/pandas-dev","html_url":"https://github.com/pandas-dev","followers_url":"https://api.github.com/users/pandas-dev/followers","following_url":"https://api.github.com/users/pandas-dev/following{/other_user}","gists_url":"https://api.github.com/users/pandas-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/pandas-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pandas-dev/subscriptions","organizations_url":"https://api.github.com/users/pandas-dev/orgs","repos_url":"https://api.github.com/users/pandas-dev/repos","events_url":"https://api.github.com/users/pandas-dev/events{/privacy}","received_events_url":"https://api.github.com/users/pandas-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pandas-dev/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":false,"url":"https://api.github.com/repos/pandas-dev/pandas","forks_url":"https://api.github.com/repos/pandas-dev/pandas/forks","keys_url":"https://api.github.com/repos/pandas-dev/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pandas-dev/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pandas-dev/pandas/teams","hooks_url":"https://api.github.com/repos/pandas-dev/pandas/hooks","issue_events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/pandas-dev/pandas/events","assignees_url":"https://api.github.com/repos/pandas-dev/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/pandas-dev/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/pandas-dev/pandas/tags","blobs_url":"https://api.github.com/repos/pandas-dev/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pandas-dev/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pandas-dev/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/pandas-dev/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pandas-dev/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/pandas-dev/pandas/languages","stargazers_url":"https://api.github.com/repos/pandas-dev/pandas/stargazers","contributors_url":"https://api.github.com/repos/pandas-dev/pandas/contributors","subscribers_url":"https://api.github.com/repos/pandas-dev/pandas/subscribers","subscription_url":"https://api.github.com/repos/pandas-dev/pandas/subscription","commits_url":"https://api.github.com/repos/pandas-dev/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/pandas-dev/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/pandas-dev/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/pandas-dev/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pandas-dev/pandas/merges","archive_url":"https://api.github.com/repos/pandas-dev/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pandas-dev/pandas/downloads","issues_url":"https://api.github.com/repos/pandas-dev/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/pandas-dev/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/pandas-dev/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/pandas-dev/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pandas-dev/pandas/labels{/name}","releases_url":"https://api.github.com/repos/pandas-dev/pandas/releases{/id}","deployments_url":"https://api.github.com/repos/pandas-dev/pandas/deployments","created_at":"2010-08-24T01:37:33Z","updated_at":"2018-03-10T21:42:36Z","pushed_at":"2018-03-10T21:56:37Z","git_url":"git://github.com/pandas-dev/pandas.git","ssh_url":"git@github.com:pandas-dev/pandas.git","clone_url":"https://github.com/pandas-dev/pandas.git","svn_url":"https://github.com/pandas-dev/pandas","homepage":"http://pandas.pydata.org","size":118194,"stargazers_count":13328,"watchers_count":13328,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5432,"mirror_url":null,"archived":false,"open_issues_count":2523,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":5432,"open_issues":2523,"watchers":13328,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249"},"html":{"href":"https://github.com/pandas-dev/pandas/pull/20249"},"issue":{"href":"https://api.github.com/repos/pandas-dev/pandas/issues/20249"},"comments":{"href":"https://api.github.com/repos/pandas-dev/pandas/issues/20249/comments"},"review_comments":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249/comments"},"review_comment":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pandas-dev/pandas/pulls/20249/commits"},"statuses":{"href":"https://api.github.com/repos/pandas-dev/pandas/statuses/bf6307bbc55980d3fb36d75751bc52c711dbe4d3"}},"author_association":"NONE"}}
{"actor":{"display_login":"TomAugspurger"}}