How to transpose List?

前端 未结 10 727
温柔的废话
温柔的废话 2021-01-01 17:59

I have a following ArrayList,

[Title,Data1,Data2,Data3]
[A,2,3,4]
[B,3,5,7]

And I would like to convert this one like this,



        
10条回答
  •  旧时难觅i
    2021-01-01 18:48

    If it is for a datamigration task, you might consider your friendly spreadsheet if the size is not too big.

    For matrix manipulation stuff there is the jScience library which has matrix support. For just transposing a metrix this would be overkill, but it depends what needs to be done with it.

提交回复
热议问题