Might be clearer as:

    component_index = self.components.setdefault(component, len(self.components))
    self.current_row[component_index] = score

Upon experimentation, it also looks like you could set up `self.components` as `self.components = defaultdict(lambda: len(self.components))`, and then just use it like `self.current_row[self.components[component]] = score`.