【问题标题】:Issue with null character received by qpython/pandas from kdbqpython/pandas 从 kdb 收到空字符的问题
【发布时间】:2016-09-16 16:29:16
【问题描述】:

这个问题几乎是针对@Maciej Lach,但如果其他人遇到过这个问题,请告诉我。

问题很简单 - 每当 kdb 向其中一个列具有空白字符的单行表发送它时,qpyhton 就会崩溃(当 pandas 设置为 true 时)。

我正在使用:python 版本 2.7.11、qpython 版本 qPython-1.2.0、pandas-0.18.1

复制:

from qpython import qconnection

q = qconnection.QConnection(pandas = True, host = 'myhost', port = myport)

print 'initiating connection(s)'
q.open()

while True:
    msg = q.receive(data_only = True, raw = False)
    print 'message received'

现在,在 kdb 方面:

/send a table (which just so happens to have blank/null chars)
neg[4](`upd;`trade;([] col1:`a`b`c;col2:"  a"))
/no problem

/send last row of that table
neg[4](`upd;`trade;-1#([] col1:`a`b`c;col2:"  a"))
/no problem

/send two rows (2 blank chars)
neg[4](`upd;`trade;2#([] col1:`a`b`c;col2:"  a"))
/no problem

/send first row of that table (one blank char)
neg[4](`upd;`trade;1#([] col1:`a`b`c;col2:"  a"))
/crashes with error "AttributeError: 'float' object has no attribute 'meta'"

似乎只有在我发送具有空字符的单行表时才会出现问题。 可以使用多个空字符。使用非空字符的单行表很好。 没有 Pandas=True 选项一切都很好(但我的用例需要 pandas=True)。

有什么想法吗?

【问题讨论】:

    标签: python pandas kdb q-lang exxeleron-q


    【解决方案1】:

    这是 qPython 库中的一个错误。

    我已向维护者提供了带有修复程序的 pull request

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-22
      • 2016-10-15
      相关资源
      最近更新 更多