Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

np append row

A= [[1, 2, 3], [4, 5, 6]]
np.append(A, [[7, 8, 9]], axis=0)

    >> array([[1, 2, 3],
              [4, 5, 6],
              [7, 8, 9]])
#or 
np.r_[A,[[7,8,9]]]
Comment

PREVIOUS NEXT
Code Example
Python :: python sort the values in a dictionaryi 
Python :: how to add the sum of multiple columns into another column in a dataframe 
Python :: reading json file 
Python :: generate secret key python 
Python :: pyqt5 qtreewidgetitem enable drop drag 
Python :: np.arange and np.linspace difference 
Python :: camel case in python 
Python :: python series 
Python :: button tkinter 
Python :: how to open cmd at specific size using python 
Python :: NumPy unique Example Get the unique rows and columns 
Python :: python fstring 
Python :: how to convert adjacency list to adjacency matrix 
Python :: make an android app with python 
Python :: map and filter in python 
Python :: django admin override save 
Python :: random python between 0 and 1 
Python :: pandas nan values in column 
Python :: Discord python get member object by id 
Python :: Matplotlib rotated xticklabels 
Python :: heroku django procfile 
Python :: Support Vector Machine (SVM) classifier 
Python :: python async partial function 
Python :: how to append a dataframe to another dataframe in pandas 
Python :: python compare floats 
Python :: import ndimage 
Python :: python combine two lists into matrix 
Python :: python web crawler 
Python :: install local package python 
Python :: python zip() 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =