def run(self, table):
        column = table.columns[self._column_name]

        if self._comparer:
            if six.PY3:
                data_sorted = sorted(column.values(), key=cmp_to_key(self._comparer))
            else:  # pragma: no cover
                data_sorted = sorted(column.values(), cmp=self._comparer)
        else:
            data_sorted = column.values_sorted()

        if self._reverse:
            data_sorted.reverse()

        ranks = {}
        rank = 0

        for c in data_sorted:
            rank += 1

            if c in ranks:
                continue

            ranks[c] = Decimal(rank)

        new_column = []

        for row in table.rows:
            new_column.append(ranks[row[self._column_name]])

        return new_column
Using a non-boolean condition.
dataset/ETHPy150Open wireservice/agate/agate/computations/rank.py/Rank.run--crossover with--dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_queries.py/ScalarTableUsageTestCase.test_not_boolean