Well, the problem was that I was saving integers as strings, while the right way is to save them as bytes:
table.put(key, {'cf:id': struct.pack(">q", value)})
When querying to database, the values from the filter have to be packed too:
for key, data in graph_table.scan(filter="SingleColumnValueFilter('cf', 'id', <, 'binary:%s', true, false)" % struct.pack(">q", 1000)):
print key, data
And finally, unpacking the result:
value = struct.unpack(">q", data['cf:id'])[0]
Thank you very much.