Skip to content

Instantly share code, notes, and snippets.

@knnkanda
Created April 1, 2018 10:30
Show Gist options
  • Save knnkanda/bfa8c02ed7271fdf8741638c76d9eb7a to your computer and use it in GitHub Desktop.
Save knnkanda/bfa8c02ed7271fdf8741638c76d9eb7a 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