这是原始数据
a=[[1,2,3,4,5,6],
[7,8,9,10,11,12]]
我想将其转换为如下格式:
b=[[1,2,3,7,8,9],
[4,5,6,10,11,12]]
array(List).swapaxes()
如何在python中使用reshape和swapax?
由于
答案 0 :(得分:1)
试试这个:
{
"array_1": [{
"url": "xyz",
"position": "5",
"thumbnailImage": ""
}],
"array_2": [{
"url": "abc",
"position": "1",
"thumbnailImage": ""
}, {
"url": "def",
"position": "2",
"thumbnailImage": ""
}, {
"url": "ghi",
"position": "3",
"thumbnailImage": ""
}, {
"url": "jkl",
"position": "4",
"thumbnailImage": ""
}],
"array_3": [{
"url": "mno",
"position": "0",
"thumbnailImage": ""
}]
}