KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
190 stars 49 forks source link

Using q.show in Jupyter Notebook #41

Closed ghost closed 4 years ago

ghost commented 6 years ago

Using q.show in jupyter notebook outputs the value to the command prompt jupyter notebook is started from but doesn't output to the console in the browser, it just shows : :

sashkab commented 6 years ago

You don't really need to use q.show() in your Notebook.

In order to use PyQ in a Jupyter notebook, you need to install pyq-kernel. See https://pypi.python.org/pypi/pyq-kernel.

Installation instructions are:

pip install pyq-kernel
pyq -m pyq.kernel install

Then you will need to either create new notebook with PyQ X kernel (where X is 2 for Python 2, or 3 for Python 3).

notebook
abalkin commented 6 years ago

In addition, you can enable show in q sells by redirecting q stdout to the notebook:

screen shot 2018-01-09 at 4 44 23 pm
abalkin commented 6 years ago

I am reopening this issue to clarify that the reported behavior affects q('show') and q.show(), but not the .show() method of K objects:

screen shot 2018-01-09 at 4 55 25 pm

I do recall thinking about making q.show the same as K.show, but I don't remember the reasons for the decision to keep q.show equivalent to q('show') rather than treating it as a special case.

github-actions[bot] commented 4 years ago

Stale issue message