Skip to content

Add option to set results in selected_indexes for resultstable.add_results #98

@lguerard

Description

@lguerard

Idea would be to improve that method to fill the role of another one of Kai's functions:

def add_results(rt, column, row, value):
    """Add a value in specified rows of a given column.

    Parameters
    ----------
    rt : ij.measure.ResultsTable
        A reference to the IJ-ResultsTable.
    column : str
        The column in which to add the values.
    row : list of int
        The row numbers in which to add the values.
    value : str, float, or int
        The value to be set.
    """
    # Iterate over each row index in the row list
    for i in range(len(row)):
        # Set the specified value in the given column and row
        rt.setValue(column, row[i], value)

    # Display the updated ResultsTable
    rt.show("Results")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions