You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error when trying to plot with matplotlib. Here's my code
result = %sql select Month, KB_Over...
%matplotlib inline
result.plot()
Here's the output:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-14-083688faac41> in <module>()
----> 1 result.plot()
C:\Users\{me}\AppData\Local\Continuum\Anaconda3\lib\site-packages\sql\run.py in plot(self, title,
**kwargs)
197 self.guess_plot_columns()
198 self.x = self.x or range(len(self.ys[0]))
--> 199 coords = reduce(operator.add, [(self.x, y) for y in self.ys])
200 plot = plt.plot(*coords, **kwargs)
201 if hasattr(self.x, 'name'):
NameError: name 'reduce' is not defined
Solution
Just go to C:\Users\{user}\AppData\Local\Continuum\Anaconda3\lib\site-packages\sql\run.py
and add from functools import reduce at the top.
The text was updated successfully, but these errors were encountered:
I'm getting this error when trying to plot with matplotlib. Here's my code
Here's the output:
Solution
Just go to
C:\Users\{user}\AppData\Local\Continuum\Anaconda3\lib\site-packages\sql\run.py
and add
from functools import reduce
at the top.The text was updated successfully, but these errors were encountered: