📌  相关文章
📜  将 numpy 数组添加到 pandas 数据帧 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:16.755000             🧑  作者: Mango

代码示例1
#create NumPy array for 'blocks'
blocks = np.array([2, 3, 1, 0, 2, 7, 8, 2])

#add 'blocks' array as new column in DataFrame
df['blocks'] = blocks.tolist()