---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/utils.py in match(v1, v2, nomatch, incomparables, start)
139 with suppress(KeyError):
--> 140 lst[i] = lookup[x] + start
141
KeyError: nan
During handling of the above exception, another exception occurred:
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-371-eed5ae626cd0> in <module>()
1 ggplot(aes(x='match_weighted_cat',
2 color='imp_weighted_cat',
----> 3 y='Oct4/profile_match'), dfi_anno.sample(100000)) + geom_boxplot()
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/IPython/core/displayhook.py in __call__(self, result)
255 self.start_displayhook()
256 self.write_output_prompt()
--> 257 format_dict, md_dict = self.compute_format_data(result)
258 self.update_user_ns(result)
259 self.fill_exec_result(result)
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/IPython/core/displayhook.py in compute_format_data(self, result)
149
150 """
--> 151 return self.shell.display_formatter.format(result)
152
153 # This can be set to True by the write_output_prompt method in a subclass
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/IPython/core/formatters.py in format(self, obj, include, exclude)
178 md = None
179 try:
--> 180 data = formatter(obj)
181 except:
182 # FIXME: log the exception
<decorator-gen-10> in __call__(self, obj)
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/IPython/core/formatters.py in catch_format_error(method, self, *args, **kwargs)
222 """show traceback on failed format call"""
223 try:
--> 224 r = method(self, *args, **kwargs)
225 except NotImplementedError:
226 # don't warn on NotImplementedErrors
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
700 type_pprinters=self.type_printers,
701 deferred_pprinters=self.deferred_printers)
--> 702 printer.pretty(obj)
703 printer.flush()
704 return stream.getvalue()
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/IPython/lib/pretty.py in pretty(self, obj)
398 if cls is not object \
399 and callable(cls.__dict__.get('__repr__')):
--> 400 return _repr_pprint(obj, self, cycle)
401
402 return _default_pprint(obj, self, cycle)
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/IPython/lib/pretty.py in _repr_pprint(obj, p, cycle)
693 """A pprint that just redirects to the normal repr function."""
694 # Find newlines and replace them with p.break_()
--> 695 output = repr(obj)
696 for idx,output_line in enumerate(output.splitlines()):
697 if idx:
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/ggplot.py in __repr__(self)
84 Print/show the plot
85 """
---> 86 self.draw()
87 plt.show()
88 return '<ggplot: (%d)>' % self.__hash__()
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/ggplot.py in draw(self, return_ggplot)
177 # assign a default theme
178 self = deepcopy(self)
--> 179 self._build()
180
181 # If no theme we use the default
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/ggplot.py in _build(self)
274 # Compute aesthetics to produce data with generalised
275 # variable names
--> 276 layers.compute_aesthetics(self)
277
278 # Transform data using all scales
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/layer.py in compute_aesthetics(self, plot)
80 def compute_aesthetics(self, plot):
81 for l in self:
---> 82 l.compute_aesthetics(plot)
83
84 def compute_statistic(self, layout):
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/layer.py in compute_aesthetics(self, plot)
348 evaled['PANEL'] = data['PANEL']
349
--> 350 self.data = add_group(evaled)
351
352 def compute_statistic(self, layout):
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/layer.py in add_group(data)
479 disc = discrete_columns(data, ignore=['label'])
480 if disc:
--> 481 data['group'] = ninteraction(data[disc], drop=True)
482 else:
483 data['group'] = NO_GROUP
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/utils.py in ninteraction(df, drop)
288
289 if drop:
--> 290 return _id_var(res, drop)
291 else:
292 return res
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/utils.py in _id_var(x, drop)
319 levels = multitype_sort(set(x))
320
--> 321 lst = match(x, levels)
322 lst = [item + 1 for item in lst]
323
~/bin/anaconda3/envs/chipnexus/lib/python3.6/site-packages/plotnine/utils.py in match(v1, v2, nomatch, incomparables, start)
138
139 with suppress(KeyError):
--> 140 lst[i] = lookup[x] + start
141
142 return lst
KeyboardInterrupt: