-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null float to KDB+ converts to empty string #50
Comments
Does anyone know why sending |
it looks like there is a bug connected with Pandas integration. When serializing generic lists, NaN values are converted to single space. Before the patch is available and pulled by the maintainer, please use this workaround: from qpython.qtype import qnull, QDOUBLE
from qpython import qconnection
from qpython.qwriter import QWriter
with qconnection.QConnection(host = 'localhost', port = 5000, writer_class = QWriter) as q:
q.sync('foo', 'table', ['PYTHON', qnull(QDOUBLE)]) This enforces qpython to use default, non-pandas serializer, even if the pandas package is installed. Best regards |
This worked.. thank you for your help. |
Fix: serialization of 0n in generic lists (when Pandas package is installed) (#50)
I am currently using python 2.7.12 using qpython 1.2.2, numpy 1.10.4.
Running the following script does not send a NAN float datatype to KDB+ but instead an empty string.
from qpython.qtype import qnull,QDOUBLE,QFLOAT,_QNAN64
from qpython import qconnection
import numpy
q = qconnection.QConnection(host = 'localhost', port = 5010)
q.open()
q.sync('foo',numpy.string_('test_trade'),[numpy.string_('PYTHON'),qnull(QDOUBLE)])
or
q.sync('foo',numpy.string_('test_trade'),[numpy.string_('PYTHON'),_QNAN64])
KDB+ 3.3 2015.11.03 :
q)foo:{[x;y] show y}
q)
IBM " " 2nd example: q.sync('foo',numpy.string_('test_trade'),[numpy.string_('IBM'),qnull(-7)]) q)
IBM0N
Seems like a bug when trying to send a null float datatype .
The text was updated successfully, but these errors were encountered: