Beispiel #1
0
    def calc(self, a_val, b_val):
        # This needs to return a list, since it is a list of outputs
        """
        Add a_test and b_test.

        :param a_val: Can be a number or a string.
        :param b_val: Can be a number or a string.
        :return: Return the sum of a_test and b_test.
        """
        return [misc.add(a_val, b_val)]
Beispiel #2
0
    def __call__(self, context, var1, var2, var_out):
        """
        Add two columns together, put the answer in a new column.

        :param context: The context instance, used to move data around.
        :param var1: The values in this column are added.
        :param var2: The values in this column are added.
        :param var_out: The new column name, with the values of var1 + var2.
        """
        context.exposure_att[var_out] = misc.add(context.exposure_att[var1],
                                                 context.exposure_att[var2])