你好@txnelson ,
我有一個包含近十萬列的數據集,標記為“ PG1_1s_xxxxx “ 要么 ” PG1_1US_xxxx ”。 我打算將這些列分別堆疊到兩個不同的表中,然後繼續我的分析。 這是我為執行相同操作而編寫的腳本示例。
dt = current data table();
colList = dt << Get Column Names( Numeric, "Continuous" );
For( i = 1, i <= N Items( colList ), i++,
If( Contains( colList[i], "PG1_1S_" ) &
Contains( colList[i], "MED" )
Column( colList[i] ) << Set Selected( 1 )
)
);
dt << Stack(
column(dt << get selected columns()),
Source Label Column("Label"),
Stacked Data Column("RBER"),
Name("Non-stacked Columns")(Keep(::LOT, :SLOT, :ROW, :COL, :JOB_NAME)),
Output table("PG1_1S"));
Data table("PG1_1S") << Graph Builder(
Variables( X( :V ), Y( :RBER ), Group X( :Deck ), Overlay( :JOB_NAME ) ),
Elements( Line( X, Y, Legend( 6 ) ) ),
Local Data Filter( Add Filter( columns( :Type ) ) ),
SendToReport(
Dispatch(
{},
"RBER",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12, 0 ),
Min( 0.0000000027082467925 ), Max( 1.02000000009481 ), Inc( 1 ),
Minor Ticks( 0 )}
)
)
);
<BR /><STRONG>// Creating the second stacked table.</STRONG>
colList = dt << Get Column Names( Numeric, "Continuous" );
For( i = 1, i <= N Items( colList ), i++,
If( Contains( colList[i], "PG1_1US_" ) &
Contains( colList[i], "MED" )
Column( colList[i] ) << Set Selected( 1 )
)
);
dt << Stack(
column(dt << get selected columns()),
Source Label Column("Label"),
Stacked Data Column("RBER"),
Name("Non-stacked Columns")(Keep(::LOT, :SLOT, :ROW, :COL, :JOB_NAME)),
Output table("PG1_1US"));
Data table("PG1_1US") << Graph Builder(
Variables( X( :V ), Y( :RBER ), Group X( :Deck ), Overlay( :JOB_NAME ) ),
Elements( Line( X, Y, Legend( 6 ) ) ),
Local Data Filter( Add Filter( columns( :Type ) ) ),
SendToReport(
Dispatch(
{},
"RBER",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12, 0 ),
Min( 0.0000000027082467925 ), Max( 1.02000000009481 ), Inc( 1 ),
Minor Ticks( 0 )}
)
)
);
當我運行這個腳本時,它只創建第一個堆疊表“PG1_1S”,而不是第二個。 我如何修改它以創建不同的堆疊表。
謝謝
副手,我看到的是,在您選擇要在堆疊中使用的列的任何一段代碼之前,您都沒有清除列選擇。第一次堆疊沒有選擇任何列可能是一個很好的選擇,但在第二次堆疊中,第 1 次堆疊中的所有選定列都保留了下來,而您的第二次選擇設置只是添加到從第 1 次堆疊中選擇的列第一次堆疊。
對我的問題不夠明確表示歉意。 之後我會按照您的要求遵守這些準則。 感謝您指出。