我手头有一个大数据集,想要删除名称包含“ UL”或“ LL”或“ UCL”或“ LCL”或“ USL”或“ LSL”的所有列,而整个列仅包含“”。但除列名外,不能为空。 (图像如下图所示)搜索Google并阅读JMP手册后,我不知道该怎么做。 感谢您的帮助。


这样的事情可能会做到:
Names Default To Here(1);
dt = New Table("Untitled 390",
Add Rows(9),
Compress File When Saved(1),
New Column("a",
Numeric,
"Continuous",
Format("Best", 12),
Set Values([., ., ., ., ., ., ., ., .])
),
New Column("a+LCL",
Numeric,
"Continuous",
Format("Best", 12),
Set Values([1, ., ., ., ., ., ., ., .])
),
New Column("b+LCL",
Numeric,
"Continuous",
Format("Best", 12),
Set Values([., ., ., ., ., ., ., ., .])
)
);
wait(1);
colNames = dt << Get Column Names("String");
colContainsList = {"UL", "LL", "UCL", "LCL", "USL", "LSL"};
For(i = 1, i <= N Items(colNames), i++,
For(k = 1, k <= N Items(colContainsList), k++,
If(Contains(colNames[i], colContainsList[k]),
Summarize(dt, uniqValues = By(colNames[i]));
If(N Items(uniqValues) == 1 & uniqValues[1] == ".",
dt << Delete Columns(colNames[i]);
);
break();
);
);
);您确定要检查列名是否包含这些字符串中的任何一个,或列名是否以这些字符串结尾吗?