Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lguerard opened this issue Apr 30, 2025 · 1 comment
Closed
Labels
enhancement New feature or request next-coding-session Look into during the next CS. next-release Issues blocking the next release
Milestone

Comments

@lguerard
Copy link
Contributor

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")
@lguerard lguerard added enhancement New feature or request next-coding-session Look into during the next CS. next-release Issues blocking the next release labels Apr 30, 2025
@lguerard lguerard added this to the 1.6.0 milestone Apr 30, 2025
@lguerard lguerard changed the title Add option to set results in selected_indexes for roimanager.add_results Add option to set results in selected_indexes for resultstable.add_results May 6, 2025
@rohangirishrao
Copy link
Contributor

This should add this functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next-coding-session Look into during the next CS. next-release Issues blocking the next release
Projects
Status: Done
Development

No branches or pull requests

2 participants