Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python groupby 1d array

n = np.unique(a[:,0])
np.array( [ list(a[a[:,0]==i,1]) for i in n] )
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #groupby #array
ADD COMMENT
Topic
Name
9+7 =