我手頭有一個大數據集,想要刪除名稱包含“ 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();
);
);
);您確定要檢查列名是否包含這些字符串中的任何一個,或列名是否以這些字符串結尾嗎?