# Path: bamboo/lib/utils.py
# def minint():
#     return -maxint - 1
# 
# def parse_float(value, default=None):
#     return _parse_type(np.float64, value, default)


from math import isnan
from pandas import concat, DataFrame, Series
from scipy.stats.stats import pearsonr
from bamboo.lib.utils import minint, parse_float
            1: 'denominator',
        }[idx])

    def _build_dframe(self, dframe, columns):
        for idx, column in enumerate(columns):
            column.name = self.__name_for_idx(idx)

        return concat([dframe] + [DataFrame(col) for col in columns], axis=1)

    def _add_calculated_column(self, dframe):
        column = dframe[self.__name_for_idx(0)].apply(float) /\
            dframe[self.__name_for_idx(1)]
        column.name = self.name

        return dframe.join(column)

    def __agg_dframe(self, dframe):
        return dframe[self.__name_for_idx(0)].apply(float) /\
            dframe[self.__name_for_idx(1)]


class ArgMaxAggregation(Aggregation):
    """Return the index for the maximum of a column.

    Written as ``argmax(FORMULA)``. Where `FORMULA` is a valid formula.
    """
    formula_name = 'argmax'

    def group(self):
        """For when aggregation is called with a group parameter."""

# Path: bamboo/lib/utils.py
# def minint():
#     return -maxint - 1
# 
# def parse_float(value, default=None):
#     return _parse_type(np.float64, value, default)


# Path: bamboo/core/aggregations.py
from math import isnan
from pandas import concat, DataFrame, Series
from scipy.stats.stats import pearsonr
from bamboo.lib.utils import minint, parse_float

            1: 'denominator',
        }[idx])

    def _build_dframe(self, dframe, columns):
        for idx, column in enumerate(columns):
            column.name = self.__name_for_idx(idx)

        return concat([dframe] + [DataFrame(col) for col in columns], axis=1)

    def _add_calculated_column(self, dframe):
        column = dframe[self.__name_for_idx(0)].apply(float) /\
            dframe[self.__name_for_idx(1)]
        column.name = self.name

        return dframe.join(column)

    def __agg_dframe(self, dframe):
        return dframe[self.__name_for_idx(0)].apply(float) /\
            dframe[self.__name_for_idx(1)]


class ArgMaxAggregation(Aggregation):
    """Return the index for the maximum of a column.

    Written as ``argmax(FORMULA)``. Where `FORMULA` is a valid formula.
    """
    formula_name = 'argmax'

    def group(self):
        """For when aggregation is called with a group parameter."""

        self.column = self.column.apply(lambda value: parse_float(value))