[Tutor] adding numpy to pandas
Glenn Schultz
glennmschultz at me.com
Wed Jun 20 16:04:23 EDT 2018
All,
I have a pandas dataframe and a predict result (numpy array) of a classifier [[0,1],[1,0]]. What I would like to do is as the positive to the pandas dataframe. I use predict[:,1] to slice the postive from numpy which gives me a row of the result. but I cannot concat to the pandas df['result'] = predict[:,1] does not work and I have tried various ways to do this with no result. I am missing something here. Any help is appreciated.
Glenn
More information about the Tutor
mailing list