Skip to content

Commit c4d72c1

Browse files
committed
moved "weights" after "ind"
1 parent 380e86e commit c4d72c1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/plotting/_core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,8 +1449,8 @@ def hist(
14491449
def kde(
14501450
self,
14511451
bw_method: Literal["scott", "silverman"] | float | Callable | None = None,
1452-
weights: np.ndarray | None = None,
14531452
ind: np.ndarray | int | None = None,
1453+
weights: np.ndarray | None = None,
14541454
**kwargs,
14551455
) -> PlotAccessor:
14561456
"""
@@ -1471,14 +1471,14 @@ def kde(
14711471
'scott', 'silverman', a scalar constant or a callable.
14721472
If None (default), 'scott' is used.
14731473
See :class:`scipy.stats.gaussian_kde` for more information.
1474-
weights : NumPy array, optional
1475-
Weights of datapoints. This must be the same shape as datapoints.
1476-
If None (default), the samples are assumed to be equally weighted.
14771474
ind : NumPy array or int, optional
14781475
Evaluation points for the estimated PDF. If None (default),
14791476
1000 equally spaced points are used. If `ind` is a NumPy array, the
14801477
KDE is evaluated at the points passed. If `ind` is an integer,
14811478
`ind` number of equally spaced points are used.
1479+
weights : NumPy array, optional
1480+
Weights of datapoints. This must be the same shape as datapoints.
1481+
If None (default), the samples are assumed to be equally weighted.
14821482
**kwargs
14831483
Additional keyword arguments are documented in
14841484
:meth:`DataFrame.plot`.
@@ -1564,7 +1564,7 @@ def kde(
15641564
15651565
>>> ax = df.plot.kde(ind=[1, 2, 3, 4, 5, 6])
15661566
"""
1567-
return self(kind="kde", bw_method=bw_method, weights=weights, ind=ind, **kwargs)
1567+
return self(kind="kde", bw_method=bw_method, ind=ind, weights=weights, **kwargs)
15681568

15691569
density = kde
15701570

0 commit comments

Comments
 (0)