Skip to content
Advertisement

Tag: pandas

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

When I plot density distribution of my pandas Series I use Is it possible to get output values of this plot? If yes how to do this? I need the plotted values. 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

Check if a value exists in pandas dataframe index

I am sure there is an obvious way to do this but cant think of anything slick right now. Basically instead of raising exception I would like to get True or False to see if a value exists in pandas df index. What I have working now is the following Answer This should do the trick

Advertisement