Skip to content

Function remove_rows(a, b) removes rows from a+1 to b #116

@fulvio-nrg

Description

@fulvio-nrg

Good day,
I am writing a Python script in the SNAP Python working environment to work with variable tables.
In particular, I am working with the function " .remove_rows(a, b) " to remove row in the range a-b, as indicated also in the built-in example.
However, it seems that the function removes in fact rows form a+1 to b.

In the example below, I want to remove rows 10 to 20 from a table of 30 rows and two columns:

Image

Row 10 corresponds to index 9 and row 20 corresponds to index 19. As indicated in the example of a usage of said function, I am using those indices as show in the script pasted below:

Image

However, the end result is a table in which rows 11-20 have been removed, as shown below:

Image

It seems therefore that the function " .remove_rows(a, b) " removes in fact rows from a+1 to b, and not from a to b as one might think.

Regards,
Fulvio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions