pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.58k stars 17.57k forks source link

ENH: Allow to plot weighted KDEs. #59087

Open LucaMingarelli opened 6 days ago

LucaMingarelli commented 6 days ago

Feature Type

Problem Description

The current implementation does not currently allow to plot weighted KDEs.

Feature Description

Estimation of the PDF is currently done via scipy.stats.gaussian_kde which allows for a parameter weights. pandas.DataFrame.plot.kde should accept this parameter as well.

Alternative Solutions

Here allow to pass a parameter weights to scipy.stats.gaussian_kde.

Additional Context

No response

fbourgey commented 3 days ago

Hello, I am working on it.