过滤不在给定范围内的行值(JSL)我正在尝试自动化一些数据清理。我有每列被认为有效的下限和上限值,我想删除其他具有空值的其他值。我失踪了:
- 一旦有选择,如何清除行值。
- 如何引用列名
- 如果有更好的方法来做到这一点。
Names Default To Here( 1 );
dt = Current Data Table();
lower_limit = 69.636;
higher_limit = 71.482;
sel = dt << Select Where( :my_column_name>= lower_limit &
:my_column_name<= higher_limit );
sel << Invert Row Selection;
// clear rows (sel)??
/*
// Here I am trying to do the same but referencing the column. Yet it does not work.
mycol = Column("my_column_name"); // this does not work
mycol = :my_column_name; // this does not work either
sel = dt << Select Where( mycol >= lower_limit &
mycol <= higher_limit );
*/
Re:过滤不在给定范围内的行值(JSL)您应该查找函数列()。如果要使用列值,则语法为ref_name [],即左括号,右括号。 请尝试以下语法。
sel = dt << Select Where( mycol[] >= lower_limit &
mycol[] <= higher_limit );
Re:过滤不在给定范围内的行值(JSL)很好,我怎样才能删除特定选择(行和列)的值?
Re:过滤不在给定范围内的行值(JSL)您是否想要将该列中的值替换为空,或者您是否要删除行?
Names Default To Here( 1 );
dt = Open("$sample_data/big class.jmp");
lower_limit = 70;
higher_limit = 150;
mycol = Column("weight");
sel = dt << Get Rows Where ( mycol[] < lower_limit |
mycol[] > higher_limit );
mycol[sel]= empty();
//to delete rows use
// dt << delete rows(sel);
Re:过滤不在给定范围内的行值(JSL)谢谢,这就是我想要的。
不过,我在表格中有此消息:尝试分配给锁定的列 mycol 。