

def _resolve_column_index(self, index):
    ' Resolves a column index into the correct model and adjusted\n        index. Returns the target model and the corrected index. '
    real_index = index
    cached = None
    if (cached is not None):
        (model, col_index) = cached
    else:
        model = None
        for m in self.data:
            cols = m.get_column_count()
            if (real_index < cols):
                model = m
                break
            else:
                real_index -= cols
        self._data_index[index] = (model, real_index)
    return (model, real_index)

dataset/ETHPy150Open enthought/pyface/pyface/ui/wx/grid/composite_grid_model.py CompositeGridModel._resolve_column_index/original