What’s the difference between Pandas plot.density and plot.kde?

Question:

Is there a the difference between the Pandas plot.density() and plot.kde() function?

Asked By: Rene B.

||

Answers:

According to the Pandas API Reference, there is no difference between plot.density() and plot.kde(), other than their name. These 2 functions do exactly the same thing.

As mentioned by @RichieK in the comments, both API Reference pages take you to the same source code when you click on [source] in the top right corner of the page. Thus confirming the functions are exactly the same.

Answered By: Ronan Boiteau

Just wanted to add, in the source code you can find :

density = kde 

See here: https://github.com/pandas-dev/pandas/blob/e8093ba372f9adfe79439d90fe74b0b5b6dea9d6/pandas/plotting/_core.py#L1456

Answered By: der Fotik
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.