def _add_data_for_section(self, data_section, record, columns,
                              section_name, parent_index=-1,
                              parent_table_name=None):
        data_section.append({})
        self.sections[section_name][self.CURRENT_INDEX_META] += 1
        index = self.sections[section_name][self.CURRENT_INDEX_META]
        # data_section[len(data_section)-1].update(record) # we could simply do
        # this but end up with duplicate data from repeats

        if self.split_select_multiples:
            # find any select multiple(s) and add additional columns to record
            record = self._split_select_multiples(
                record, self.select_multiples)
        # alt, precision
        self._split_gps_fields(record, self.gps_fields)
        for column in columns:
            data_value = None
            try:
                data_value = record[column]
            except KeyError:
                # a record may not have responses for some elements simply
                # because they were not captured
                pass
            data_section[
                1 - len(data_section)].update({
                    self.group_delimiter.join(column.split('/'))
                    if self.group_delimiter != DEFAULT_GROUP_DELIMITER
                    else column: data_value})

        data_section[len(data_section) - 1].update({
            XLSDataFrameBuilder.INDEX_COLUMN: index,
            XLSDataFrameBuilder.PARENT_INDEX_COLUMN: parent_index,
            XLSDataFrameBuilder.PARENT_TABLE_NAME_COLUMN: parent_table_name})

        # add ADDITIONAL_COLUMNS
        data_section[len(data_section) - 1].update(
            dict([(column, record[column] if column in record else None)
                  for column in self.ADDITIONAL_COLUMNS]))
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/apps/viewer/pandas_mongo_bridge.py/XLSDataFrameBuilder._add_data_for_section/swapped operands of `-`