Georg Heiler Georg Heiler - 23 days ago 6x
Python Question

Python sorted plot

I want to use seaborn to perform a

where the values are ordered e.g. in ascending order.

In case the
parameter of seaborn is set the plot seems to duplicate the labels for all non-NaN labels.

Trying to pre-sort the values like
mydf.sort_values(['myValueField'], ascending=False)
does not change the result as seaborn does not seem to interpret it.


Do you save the changes by pd.sort_values? If not, probably you have to add the inplace keyword:

mydf.sort_values(['myValueField'], ascending=False, inplace=True)