M
mike20007
Hi All,
I am new to python and am getting the data from hbase.
I am trying to do sum on the column as below
scanner = client.scannerOpenWithStop("tab", "10", "1000", ["cf:col1"])
total = 0.0
r = client.scannerGet(scanner)
while r:
for k in (r[0].columns):
total += float(r[0].columns[k].value)
r = client.scannerGet(scanner)
print total
Do you know of better (faster) way to do sum?
Any thoughts please?
Thanks
I am new to python and am getting the data from hbase.
I am trying to do sum on the column as below
scanner = client.scannerOpenWithStop("tab", "10", "1000", ["cf:col1"])
total = 0.0
r = client.scannerGet(scanner)
while r:
for k in (r[0].columns):
total += float(r[0].columns[k].value)
r = client.scannerGet(scanner)
print total
Do you know of better (faster) way to do sum?
Any thoughts please?
Thanks