開始使用免費開始

新增列

研究團隊發現有兩棵樹未被納入 tree_census。你的任務是把這兩棵新樹的資料,作為新列加到 tree_census 陣列的末端。新樹的資料已儲存在名為 new_trees 的 2D 陣列中:

new_trees = np.array([[1211, 227386, 20, 0], [1212, 227386, 8, 0]])

numpy 已以 np 載入,tree_censusnew_trees 陣列可直接使用。

本練習屬於課程

NumPy 入門

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Print the shapes of tree_census and new_trees
print(____)
編輯並執行程式碼