Code Monkey home page Code Monkey logo

jupyter_drill's People

Contributors

johnomernik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

datadistillr

jupyter_drill's Issues

Error when executing queries

I seem to be getting an error when I try to execute a query. The error seems to be inconsistent in that some plugins cause this error and others do not. I did validate the query and it is correct.

Here is the stack trace:

0 Records in Approx 0 seconds

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-12-22bc49393c40> in <module>
----> 1 get_ipython().run_cell_magic('drill', '', 'SELECT useragent\nFROM splunk.main\nLIMIT 50\n')

~/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
   2379             with self.builtin_trap:
   2380                 args = (magic_arg_s, cell)
-> 2381                 result = fn(*args, **kwargs)
   2382             return result
   2383 

<decorator-gen-126> in drill(self, line, cell)

~/anaconda3/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
    185     # but it's overkill for just that one bit of state.
    186     def magic_deco(arg):
--> 187         call = lambda f, *a, **k: f(*a, **k)
    188 
    189         if callable(arg):

~/anaconda3/lib/python3.7/site-packages/drill_core/drill_base.py in drill(self, line, cell)
    369                     print("I am sorry, I don't know what you want to do with your line magic, try just %" + self.name_str + "for help options")
    370         else: # This is run is the cell is not none, thus it's a cell to process  - For us, that means a query
--> 371             self.handleCell(cell)
    372 

~/anaconda3/lib/python3.7/site-packages/integration_core/integration_base.py in handleCell(self, cell)
    172                         else:
    173                             # Hack to hide the index field
--> 174                             display(qgrid.show_grid(result_df, grid_options={'forceFitColumns': False, 'defaultColumnWidth': int(self.opts['qg_defaultColumnWidth'][0])}, column_definitions={ 'index': { 'maxWidth': 0, 'minWidth': 0, 'width': 0  } }))
    175 
    176                     else:

~/anaconda3/lib/python3.7/site-packages/qgrid/grid.py in show_grid(data_frame, show_toolbar, precision, grid_options, column_options, column_definitions, row_edit_callback)
    498     elif not isinstance(data_frame, pd.DataFrame):
    499         raise TypeError(
--> 500             "data_frame must be DataFrame or Series, not %s" % type(data_frame)
    501         )
    502 

TypeError: data_frame must be DataFrame or Series, not <class 'NoneType'>

Here is the code:

from drill_core import Drill
ipy = get_ipython()
Drill = Drill(ipy, drill_embedded=True,  pd_display_grid="qgrid")
ipy.register_magics(Drill)

# New Cell
%drill connect

#New Cell
%%drill
SELECT * FROM .... 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.