collection.Counterで作った辞書を棒グラフでプロット[python]

7月 26, 2020

f:id:Vastee:20190919152736p:plain
import collections
import matplotlib.pyplot as plt

l = ['a', 'b', 'b', 'b', 'c']
c = collections.Counter(l)
plt.bar(list(c.keys()), list(c.values()))

Pythonpandas,Python

Posted by vastee