Georg Heiler Georg Heiler - 1 year ago 100
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.

Answer Source

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)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download