I am trying to plot a bar graph of the top 10 people tweeting about a certain subject in deepnote.
This is the code:
counts = df['user'].value_counts()[:10]
plt.figure()
sns.barplot(counts.values,counts.index, alpha=0.8)
plt.title('top 10 users',fontsize=12,font='bold')
plt.xlabel('Number of tweets', fontsize=12)
plt.ylabel('user', fontsize=12)
plt.show()
This gives me the following error:
TypeError: barplot() takes from 0 to 1 positional arguments but 2 were given
PS: This same code works in Jupyter Notebook. why does it give me this error in Deepnote and how can I resolve it?