# Buggy code
def process_data(self):
    """Take the CategoricalHeatMap data from the input **value.

    It calculates the chart properties accordingly. Then build a dict
    containing references to all the calculated points to be used by
    the rect glyph inside the ``_yield_renderers`` method.

    """
    for op in self._data.operations:
        if isinstance(op, Bins):
            self.bin_width = op.get_dim_width("x")
            self.bin_height = op.get_dim_width("y")
            self._bins = op

    # if we have values specified but color attribute not setup, do so
    if self.attributes["color"].columns is None:
        self.attributes["color"].setup(
            data=self._data.source, columns=self.values.selection or "values"
        )
    self.attributes["color"].add_bin_labels(self._data)


# Traceback (OverflowError)
Traceback (most recent call last):
File "test.py", line 22, in <module>
hist = Histogram(df, values='values',  legend=True,
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/builder/histogram_builder.py", line 53, in Histogram
return create_and_build(HistogramBuilder, data, **kw)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/_builder.py", line 64, in create_and_build
chart.add_builder(builder)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/_chart.py", line 134, in add_builder
builder.create(self)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/_builder.py", line 303, in create
chart.add_renderers(self, renderers)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/_chart.py", line 129, in add_renderers
self.renderers += renderers
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/builder/bar_builder.py", line 228, in _yield_renderers
**group_kwargs)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/glyphs.py", line 469, in __init__
super(HistogramGlyph, self).__init__(**kwargs)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/_models.py", line 61, in __init__
self.setup()
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/_models.py", line 64, in setup
self.renderers = [renderer for renderer in self.build_renderers()]
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/glyphs.py", line 478, in build_renderers
self.bins = Bins(values=self.values, bin_count=self.bin_count)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/stats.py", line 164, in __init__
super(Bins, self).__init__(**properties)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/stats.py", line 23, in __init__
self._refresh()
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/stats.py", line 29, in _refresh
self.calculate()
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bokeh/charts/stats.py", line 174, in calculate
binned, bin_edges = pd.cut(self.get_data(), self.bin_count, retbins=True, precision=0)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/tools/tile.py", line 100, in cut
bins = np.linspace(mn, mx, bins + 1, endpoint=True)
File "/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/function_base.py", line 84, in linspace
num = int(num)
OverflowError: cannot convert float infinity to integer

# Fixed code
def process_data(self):
    """Take the CategoricalHeatMap data from the input **value.

    It calculates the chart properties accordingly. Then build a dict
    containing references to all the calculated points to be used by
    the rect glyph inside the ``_yield_renderers`` method.

    """
    for op in self._data.operations:
        if isinstance(op, Bins):
            self.bin_width = op.get_dim_width("x")
            self.bin_height = op.get_dim_width("y")
            self._bins = op

    # if we have values specified but color attribute not setup, do so
    if self.values.selection is None:
        self.values.selection = "values"

    if self.attributes["color"].columns is None:
        self.attributes["color"].setup(
            data=self._data.source, columns=self.values.selection
        )
    self.attributes["color"].add_bin_labels(self._data)