Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

merging results from model.predict() prediction with original pandas dataframe

#set prediction in dataframe pandas

y_hats2 = model.predict(X)

df['y_hats'] = y_hats2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #merging #results #prediction #original #pandas #dataframe
ADD COMMENT
Topic
Name
6+3 =