如如何通过变量传入 panel 的 metrics 参数

请问 panel 函数指标列 metrics 如果要传入一个变量应该怎么写?

attachments-2023-08-WjYvyFJo64d49774bcb28.png

请先 登录 后评论

1 个回答

veryOrdinary

给定列名,直接通过列名索引得到对应列即可

t = table(1 1 2 2 2 3 3 as id, 2020.09.01 + 1 3 1 2 3 2 3 as date, 1..7 as factor1, 4..10 as factor2);
metrics=["factor1", "factor2"]
panel(t.date, t.id, t[metrics], 2020.09.02 2020.09.03, 1 2)

请先 登录 后评论
  • 1 关注
  • 0 收藏,460 浏览
  • Polly 提出于 2023-08-10 15:55

相似问题