// データテーブルを取得
dt = Current Data Table();
// B列のユニークな値を取得(グループ化のため)
unique_groups = As List(dt:B<< Get As Matrix);
// 新しい列 "mother" を作成
dt << New Column("mother", Character, "Nominal");
// 各グループごとに処理を実行
For(i = 1, i <= N Items(unique_groups), i++,
// 現在のグループをフィルタリング
current_group = unique_groups[i];
Show(current_group);
subset_rows = As List(dt << Get Rows Where(:B == current_group));
Show(subset_rows);
Show(Type(subset_rows));
// A列のキーを取得
score_indices = dt:A[subset_rows] << Get As List;
Show(score_indices);
// グループ内の "mother" 列を更新
dt:mother[subset_rows] = If(
Is Missing(score_indices[Col Mode(Col Score(dt:A[subset_rows]))]),
score_indices[2],
score_indices[Col Mode(Col Score(dt:A[subset_rows]))]
);
);
B列のユニークな値を取得し、これを用いてグループごとに処理を行っています。
しかし、これではエラーが出力されます。「You need to input a scriptable object for Send.」。
何か知見があれば教えていただきたいです。