1
這個問題很直接針對@Maciej Lach,但如果有其他人遇到過這個問題,請告訴我。qpython/pandas從kdb收到的空字符問題
問題很簡單 - 每當kdb發送一行表時,qpyhton崩潰(當pandas設置爲true時),其中一列有空白字符。
我使用:Python版本2.7.11,qpython版本qPython-1.2.0,熊貓-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用於我的用例)。
任何想法?
輝煌,再次感謝。 – terrylynch