0

I have some doubts. I get some result

poz = positiv[positiv["number"]>0].head(10)
poz

I got the output:

    number
abnormal    16
abolish 5
abominable  5
abomination 4
abort   1
aborted 6
abrasive    1
abrupt  6
abruptly    284
absence 10

But my result is alphabetical, how to sort so that it shows the most frequently used words. I tried using pd.nlargest but the result was the same as above.

1 Answer 1

1

Try with sort_values

poz = poz.sort_values('number',ascending=False).head(10)
Sign up to request clarification or add additional context in comments.

2 Comments

not helped. poz.sort_values(by='number').plot.barh i have it and show only word startwith a
@whyimnotwhy sort then head

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.