データをグラフにする
import tkinter
import csv
root = tkinter.Tk()
root.title("データをグラフにする")
ca = tkinter.Canvas(width=800, height=480, bg="white")
ca.pack()
f = open("売り上げデータ.csv",encoding="utf-8")
cr = csv.reader(f)
dat = list(cr)
f.close()
bar_x = 40
bar_b = 460
for ye in range(1,6):
for mo in range(1,13):
h = int(dat[mo][ye])/2
ca.create_rectangle(bar_x, bar_b, bar_x+6, bar_b-h, fill="black")
bar_x = bar_x + 12
root.mainloop()