---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-83-52f972626bef> in <module>()
----> 1 plt.hist(counts.value_counts(), bins=20)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/pyplot.py in hist(x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, hold, **kwargs)
2894 histtype=histtype, align=align, orientation=orientation,
2895 rwidth=rwidth, log=log, color=color, label=label,
-> 2896 stacked=stacked, **kwargs)
2897 draw_if_interactive()
2898 finally:
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/axes/_axes.py in hist(self, x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, **kwargs)
5602 # Massage 'x' for processing.
5603 # NOTE: Be sure any changes here is also done below to 'weights'
-> 5604 if isinstance(x, np.ndarray) or not iterable(x[0]):
5605 # TODO: support masked arrays;
5606 x = np.asarray(x)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pandas/core/series.py in __getitem__(self, key)
512 def __getitem__(self, key):
513 try:
--> 514 result = self.index.get_value(self, key)
515
516 if not np.isscalar(result):
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pandas/core/index.py in get_value(self, series, key)
2761
2762 k = _values_from_object(key)
-> 2763 loc = self.get_loc(k)
2764 new_values = _values_from_object(series)[loc]
2765
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pandas/core/index.py in get_loc(self, key, method)
2818 except (TypeError, NotImplementedError):
2819 pass
-> 2820 return super(Float64Index, self).get_loc(key, method=method)
2821
2822 @property
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pandas/core/index.py in get_loc(self, key, method)
1435 """
1436 if method is None:
-> 1437 return self._engine.get_loc(_values_from_object(key))
1438
1439 indexer = self.get_indexer([key], method=method)
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3824)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3704)()
pandas/hashtable.pyx in pandas.hashtable.Float64HashTable.get_item (pandas/hashtable.c:9964)()
pandas/hashtable.pyx in pandas.hashtable.Float64HashTable.get_item (pandas/hashtable.c:9902)()
KeyError: 0.0