python - Python2.7: How to create bar graph using index and column information? -
i have started learning python 2.7 data science , encounter difficulty not solve after googling... appreciate if me how create bar graph.
so have data frame this. created data frame original data using pivot table, allocating popular activities index , countries in column. data inside total # of votes popular activity in each country. make bar graphs based on each country. this.
i appreciate if give me tips make kind of graph? not figure out how allocate index on y axis , frequency in x axis.
thank you!
i think need dataframe.plot.barh
:
import matplotlib.pyplot plt df.plot.barh() #pandas version bellow 0.17.0 #df.plot(kind='barh') plt.show()
Comments
Post a Comment