提取matrix的rowLabel

求问,已知b是个带有时间轴的matrix,如何把时间轴这个信息提取出来?

m=matrix(1..5, 11..15)
m.rename!(2020.01.01..2020.01.05, `A`B) //
m.setIndexedMatrix!()
           A B
           - --
2020.01.01|1 11
2020.01.02|2 12
2020.01.03|3 13
2020.01.04|4 14
2020.01.05|5 15

请先 登录 后评论

1 个回答

peter

可以使用rowNames/colNames提取标签矩阵的行/列标签。如

 m.rowNames()
[2020.01.01,2020.01.02,2020.01.03,2020.01.04,2020.01.05]
 m.colNames()
["A","B"]

请先 登录 后评论
  • 1 关注
  • 0 收藏,214 浏览
  • wfHuang 提出于 2024-02-23 16:26

相似问题