Reputation: 69
So this is how my dataset looks like but when i use
plot.line()
it gives me the error " no numeric data to plot"
apply to numeric doesn't seem to work
Upvotes: 0
Views: 180
Reputation: 20342
There are so, so many ways!
import seaborn as sns
sns.scatterplot(x="Country Name", y="China", data=df)
sns.lineplot(x="Country Name", y="China", data=df)
sns.barplot(x="Country Name", y="China", data=df)
See the links below for more info.
https://www.python-graph-gallery.com/
https://seaborn.pydata.org/tutorial/introduction
Upvotes: 0
Reputation: 51
check if the below code helps.
import matplotlib.pyplot as plt
x = df.iloc[:,0]
y = df.iloc[:,1]
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()
Upvotes: 1