Python Query Binary Values Table