{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/20132","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20132/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20132/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20132/events","html_url":"https://github.com/pandas-dev/pandas/pull/20132","id":304071767,"number":20132,"title":"DOC: update the docstrings of Interval and IntervalMixin","user":{"login":"akoeltringer","id":20040973,"avatar_url":"https://avatars0.githubusercontent.com/u/20040973?v=4","gravatar_id":"","url":"https://api.github.com/users/akoeltringer","html_url":"https://github.com/akoeltringer","followers_url":"https://api.github.com/users/akoeltringer/followers","following_url":"https://api.github.com/users/akoeltringer/following{/other_user}","gists_url":"https://api.github.com/users/akoeltringer/gists{/gist_id}","starred_url":"https://api.github.com/users/akoeltringer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akoeltringer/subscriptions","organizations_url":"https://api.github.com/users/akoeltringer/orgs","repos_url":"https://api.github.com/users/akoeltringer/repos","events_url":"https://api.github.com/users/akoeltringer/events{/privacy}","received_events_url":"https://api.github.com/users/akoeltringer/received_events","type":"User","site_admin":false},"labels":[{"id":134699,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Docs","name":"Docs","color":"3465A4","default":false},{"id":150096370,"url":"https://api.github.com/repos/pandas-dev/pandas/labels/Interval","name":"Interval","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pandas-dev/pandas/milestones/53","html_url":"https://github.com/pandas-dev/pandas/milestone/53","labels_url":"https://api.github.com/repos/pandas-dev/pandas/milestones/53/labels","id":2853937,"number":53,"title":"0.23.0","description":"after 0.22","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars2.githubusercontent.com/u/953992?v=4","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":158,"closed_issues":1216,"state":"open","created_at":"2017-10-20T10:17:09Z","updated_at":"2018-03-13T23:21:50Z","due_on":"2018-03-31T07:00:00Z","closed_at":null},"comments":5,"created_at":"2018-03-10T13:44:49Z","updated_at":"2018-03-14T00:26:47Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/20132","html_url":"https://github.com/pandas-dev/pandas/pull/20132","diff_url":"https://github.com/pandas-dev/pandas/pull/20132.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/20132.patch"},"body":"Improved the docstrings of Interval (the class) and the following methods\r\nof IntervalMixin:\r\n* closed_right\r\n* closed_left\r\n* open_right\r\n* open_left\r\n\r\nChecklist 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- [ ] 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######################### Docstring (pandas.Interval)  #########################\r\n################################################################################\r\n\r\nImmutable object implementing an Interval, a bounded slice-like interval.\r\n\r\n.. versionadded:: 0.20.0\r\n\r\nParameters\r\n----------\r\nleft : value\r\n    Left bound for the interval.\r\nright : value\r\n    Right bound for the interval.\r\nclosed : {'right', 'left', 'both', 'neither'}, default 'right'\r\n    Whether the interval is closed on the left-side, right-side, both or\r\n    neither.\r\n    A closed interval (in mathematics denoted by square brackets)\r\n    contains the edge points, i.e. the closed interval `[1, 5]` consists\r\n    of the points `1, 2, 3, 4, 5`.\r\n    An open interval (in mathematics denoted by parentheses) does not\r\n    contain the edge points, i.e. the open interval `(1, 5)` consists of\r\n    the points 2, 3, 4.\r\n    Intervals can also be half-open or half closed, i.e.\r\n    `[1,5) = 1, 2, 3, 4` and `(1, 5] = 2, 3, 4, 5`. See also the examples\r\n    section below.\r\n\r\nExamples\r\n--------\r\n>>> iv = pd.Interval(left=0, right=5)\r\n>>> iv\r\nInterval(0, 5, closed='right')\r\n>>> 2.5 in iv\r\nTrue\r\n>>> 0 in iv\r\nFalse\r\n>>> 5 in iv\r\nTrue\r\n\r\n>>> year_2017 = pd.Interval(pd.Timestamp('2017-01-01'),\r\n...                         pd.Timestamp('2017-12-31'), closed='both')\r\n>>> pd.Timestamp('2017-01-01 00:00') in year_2017\r\nTrue\r\n\r\nSee Also\r\n--------\r\nIntervalIndex : An Index of Interval objects that are all closed on the\r\n                same side.\r\ncut : Convert arrays of continuous data into bins of Series/Categoricals\r\n      of Interval.\r\nqcut : Convert arrays of continuous data into bins of Series/Categoricals\r\n       of Interval based on quantiles.\r\n\r\n################################################################################\r\n################################## Validation ##################################\r\n################################################################################\r\n\r\nErrors found:\r\n        Errors in parameters section\r\n                Unknown parameters {'left', 'right', 'closed'}\r\n        No returns section found\r\n(venv) [akoeltringer@client7 pandas]$ python scripts/validate_docstrings.py pandas.Interval.closed_left\r\n\r\n################################################################################\r\n################### Docstring (pandas.Interval.closed_left)  ###################\r\n################################################################################\r\n\r\nCheck if the interval is closed on the left side.\r\n\r\nFor the meaning of `closed` and `open` see :class:`~pandas.Interval`.\r\n\r\nReturns\r\n-------\r\nbool\r\n    `True` if the Interval is closed on the left-side, else `False`.\r\n\r\n################################################################################\r\n################################## Validation ##################################\r\n################################################################################\r\n\r\nErrors found:\r\n        See Also section not found\r\n        No examples section found\r\n(venv) [akoeltringer@client7 pandas]$ python scripts/validate_docstrings.py pandas.Interval.closed_right\r\n\r\n################################################################################\r\n################### Docstring (pandas.Interval.closed_right) ###################\r\n################################################################################\r\n\r\nCheck if the interval is closed on the right side.\r\n\r\nFor the meaning of `closed` and `open` see :class:`~pandas.Interval`.\r\n\r\nReturns\r\n-------\r\nbool\r\n    `True` if the Interval is closed on the right-side, else `False`.\r\n\r\n################################################################################\r\n################################## Validation ##################################\r\n################################################################################\r\n\r\nErrors found:\r\n        See Also section not found\r\n        No examples section found\r\n(venv) [akoeltringer@client7 pandas]$ python scripts/validate_docstrings.py pandas.Interval.open_left\r\n\r\n################################################################################\r\n#################### Docstring (pandas.Interval.open_left)  ####################\r\n################################################################################\r\n\r\nCheck if the interval is open on the left side.\r\n\r\nFor the meaning of `closed` and `open` see :class:`~pandas.Interval`.\r\n\r\nReturns\r\n-------\r\nbool\r\n    `True` if the Interval is open on the left-side, else `False`.\r\n\r\n################################################################################\r\n################################## Validation ##################################\r\n################################################################################\r\n\r\nErrors found:\r\n        See Also section not found\r\n        No examples section found\r\n(venv) [akoeltringer@client7 pandas]$ python scripts/validate_docstrings.py pandas.Interval.open_right\r\n\r\n################################################################################\r\n#################### Docstring (pandas.Interval.open_right) ####################\r\n################################################################################\r\n\r\nCheck if the interval is open on the right side.\r\n\r\nFor the meaning of `closed` and `open` see :class:`~pandas.Interval`.\r\n\r\nReturns\r\n-------\r\nbool\r\n    `True` if the Interval is open on the right-side, else `False`.\r\n\r\n################################################################################\r\n################################## Validation ##################################\r\n################################################################################\r\n\r\nErrors found:\r\n        See Also section not found\r\n        No examples section found\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\r\n* It is not clear why the error for ``pandas.Interval`` (``Unknown parameters {'left', 'right', 'closed'}``) arises - respondents to this question on Gitter were not sure either\r\n* the ``closed_right``, ``closed_left``, ``open_right`` and ``open_left`` methods have no 'examples' and no 'see also' section because for that the reader is referred to the ``Interval`` class."},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/372864341","html_url":"https://github.com/pandas-dev/pandas/pull/20132#issuecomment-372864341","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20132","id":372864341,"user":{"login":"jschendel","id":5332445,"avatar_url":"https://avatars3.githubusercontent.com/u/5332445?v=4","gravatar_id":"","url":"https://api.github.com/users/jschendel","html_url":"https://github.com/jschendel","followers_url":"https://api.github.com/users/jschendel/followers","following_url":"https://api.github.com/users/jschendel/following{/other_user}","gists_url":"https://api.github.com/users/jschendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jschendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jschendel/subscriptions","organizations_url":"https://api.github.com/users/jschendel/orgs","repos_url":"https://api.github.com/users/jschendel/repos","events_url":"https://api.github.com/users/jschendel/events{/privacy}","received_events_url":"https://api.github.com/users/jschendel/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T00:26:47Z","updated_at":"2018-03-14T00:26:47Z","author_association":"CONTRIBUTOR","body":"lgtm\r\n\r\nping @jorisvandenbossche @jreback"}}
{"actor":{"display_login":"jschendel"}}