Reputation: 413
I have a dataframe asp_correct
. I want to count the unique items from the column Predicted
in the dataframe. I am using the following code:
correct_tokens = asp_correct['Predicted'].value_counts()
correct_tokens[:20].plot.bar()
However, I want to visualize all items except O.. How I could do that? Thanks in advance!
Upvotes: 0
Views: 53
Reputation: 113
You can create a dataframe removing O value :
correct_tokens = asp_correct[asp_correct['Predicted'] != 'O']['Predicted'].value_counts()
Upvotes: 0
Reputation: 67
correct_tokens
is a Series.
Could you try correct_tokens = correct_tokens.drop(labels=['O'])
?
Upvotes: 2