Skip to content
Advertisement

How to get output of pandas .plot(kind=’kde’)?

When I plot density distribution of my pandas Series I use

JavaScript

Is it possible to get output values of this plot? If yes how to do this? I need the plotted values.

Advertisement

Answer

There are no output value from .plot(kind='kde'), it returns a axes object.

The raw values can be accessed by _x and _y method of the matplotlib.lines.Line2D object in the plot

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement