The following contents are stored in a table, in variable 'tbl',
Multico value ______________ {'1'} {'2'} 1 {'2'} {'3'} 2 {'3'} {'4'} 1 {'4'} {'5'} 2
I would like to do the following,
variable = 2,
If the variable is present in tbl.Multico, I would like to retain only those rows and delete the remining rows.
Example,
Multico value ______________ {'1'} {'2'} 1 {'2'} {'3'} 2
Also, if variable is present in column 2 of Multico, the value in column 2 of tbl will remain unchanged. If the variable is
in column 1 of Multico the sign of the value in column2 of tbl will change.
Th expected output is,
Multico value ______________ {'1'} {'2'} 1 {'2'} {'3'} -2
I'd like to ask for suggstions on how this can be done.
Is there a function similar to python's groupby for filtering contents of a table?
Best Answer