{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/20236","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20236/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20236/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20236/events","html_url":"https://github.com/pandas-dev/pandas/pull/20236","id":304105051,"number":20236,"title":"DOC: update the pandas.DataFrame.plot.density docstring","user":{"login":"jonas-schulze","id":8181318,"avatar_url":"https://avatars3.githubusercontent.com/u/8181318?v=4","gravatar_id":"","url":"https://api.github.com/users/jonas-schulze","html_url":"https://github.com/jonas-schulze","followers_url":"https://api.github.com/users/jonas-schulze/followers","following_url":"https://api.github.com/users/jonas-schulze/following{/other_user}","gists_url":"https://api.github.com/users/jonas-schulze/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas-schulze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas-schulze/subscriptions","organizations_url":"https://api.github.com/users/jonas-schulze/orgs","repos_url":"https://api.github.com/users/jonas-schulze/repos","events_url":"https://api.github.com/users/jonas-schulze/events{/privacy}","received_events_url":"https://api.github.com/users/jonas-schulze/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-10T21:03:42Z","updated_at":"2018-03-10T21:25:51Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/20236","html_url":"https://github.com/pandas-dev/pandas/pull/20236","diff_url":"https://github.com/pandas-dev/pandas/pull/20236.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/20236.patch"},"body":"This docstring is quite similar to the one of\r\n[PR20041](https://github.com/pandas-dev/pandas/pull/20041/).\r\nUnfortunately, I was not able to compute a kernel estimate of a\r\ntwo-dimensional random variable. Hence, the example is more of an\r\nanalysis of some independent data series.\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- [ ] It has been proofread on language by another sprint participant (sort of; it's based on PR20041)\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.DataFrame.plot.density)  ##################\r\n################################################################################\r\n\r\nGenerate Kernel Density Estimate plot using Gaussian kernels.\r\n\r\nIn statistics, kernel density estimation (KDE) is a non-parametric way\r\nto estimate the probability density function (PDF) of a random\r\nvariable. This function uses Gaussian kernels and includes automatic\r\nbandwith determination.\r\n\r\nParameters\r\n----------\r\nbw_method : str, scalar or callable, optional\r\n    The method used to calculate the estimator bandwidth. This can be\r\n    'scott', 'silverman', a scalar constant or a callable.\r\n    If None (default), 'scott' is used.\r\n    See :class:`scipy.stats.gaussian_kde` for more information.\r\nind : NumPy array or integer, optional\r\n    Evaluation points for the estimated PDF. If None (default),\r\n    1000 equally spaced points are used. If `ind` is a NumPy array, the\r\n    kde is evaluated at the points passed. If `ind` is an integer,\r\n    `ind` number of equally spaced points are used.\r\n**kwds : optional\r\n    Additional keyword arguments are documented in\r\n    :meth:`pandas.Series.plot`.\r\n\r\nReturns\r\n-------\r\naxes : matplotlib.AxesSubplot or np.array of them\r\n\r\nSee also\r\n--------\r\nscipy.stats.gaussian_kde : Representation of a kernel-density\r\n    estimate using Gaussian kernels. This is the function used\r\n    internally to estimate the PDF.\r\n:meth:`pandas.Series.plot.kde` : Generate a KDE plot for a Series\r\n\r\nExamples\r\n--------\r\nGiven several Series of points randomly sampled from unknown\r\ndistributions, estimate their distribution using KDE with automatic\r\nbandwidth determination and plot the results, evaluating them at\r\n1000 equally spaced points (default):\r\n\r\n.. plot::\r\n    :context: close-figs\r\n\r\n    >>> df = pd.DataFrame({\r\n    ...     'x': [1, 2, 2.5, 3, 3.5, 4, 5],\r\n    ...     'y': [4, 4, 4.5, 5, 5.5, 6, 6],\r\n    ... })\r\n    >>> ax = df.plot.kde()\r\n\r\nA scalar bandwidth can be specified. Using a small bandwidth value can\r\nlead to overfitting, while using a large bandwidth value can result\r\nin underfitting:\r\n\r\n.. plot::\r\n    :context: close-figs\r\n\r\n    >>> ax = df.plot.kde(bw_method=0.3)\r\n\r\n.. plot::\r\n    :context: close-figs\r\n\r\n    >>> ax = df.plot.kde(bw_method=3)\r\n\r\nFinally, the `ind` parameter determines the evaluation points for the\r\nplot of the estimated PDF:\r\n\r\n.. plot::\r\n    :context: close-figs\r\n\r\n    >>> ax = df.plot.kde(ind=[1, 2, 3, 4, 5, 6])\r\n\r\n################################################################################\r\n################################## Validation ##################################\r\n################################################################################\r\n\r\nErrors found:\r\n\tErrors in parameters section\r\n\t\tParameters {'kwds'} not documented\r\n\t\tUnknown parameters {'**kwds'}\r\n```\r\n\r\nI left the error because David and Israel mentioned doing it either way on Gitter .."},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/372068440","html_url":"https://github.com/pandas-dev/pandas/pull/20236#issuecomment-372068440","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/20236","id":372068440,"user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars2.githubusercontent.com/u/1020496?v=4","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":"2018-03-10T21:25:51Z","updated_at":"2018-03-10T21:25:51Z","author_association":"OWNER","body":"Ah, then you already 'stole' the ideas :-) \r\nNo, I assumed you wrote it completely independent, and then it would have been nice to combine the different enhancements in both PRs here. But that already happened then"}}
{"actor":{"display_login":"jorisvandenbossche"}}