Skip to content

Instantly share code, notes, and snippets.

@knnkanda
Created April 1, 2018 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knnkanda/e7a8eeac05df536cbf5ac807588666b5 to your computer and use it in GitHub Desktop.
Save knnkanda/e7a8eeac05df536cbf5ac807588666b5 to your computer and use it in GitHub Desktop.
bar chart matplotlib
%matplotlib inline
# グラフ化
import pandas as pd
# pandasを pdに入れる
df = pd.read_csv("population.csv")
#pdの結果をdfに入れる
df.plot.bar(y=["2016"],x=["prefecture"])
#dfをbarチャートでプロット、x縦軸に人数 Y横軸に都市名を入れる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment