我想将两个numpy数组转换为DataFrame包含两列的数组.第一个numpy数组'images'是有形的102, 1024.第二个numpy数组'label'是有形的(1020, )
我的核心代码是:
images=np.array(images)
label=np.array(label)
l=np.array([images,label])
dataset=pd.DataFrame(l)
Run Code Online (Sandbox Code Playgroud)
但事实证明这是一个错误说:
ValueError: could not broadcast input array from shape (1020,1024) into shape (1020)
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能将这两个numpy数组转换为一个数据帧中的两列?