문제

The following code fails (ValueError: too many values to unpack , under pycassaShell)
Is there some way to pretty print the supercolumns?

cf = pycassa.ColumnFamily(pool, 'Super1')
res = cf.get_range()
for key, col in res:
    print '\n\n', key, ':'
    for k, c in col:
        print k, '=>', c
도움이 되었습니까?

해결책

like this

cf = pycassa.ColumnFamily(pool, 'Super1')
res = cf.get_range()
for key, col in res:
    print '\n\n', key, ':'
    for i in col.keys():
        print i, '=>', col[i]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top