title: Target Encoding in Python Model
body: <p>I made a model in python and this uses target encoding. I used a dataset with 25000 rows and this gets divided into training and test data sets. The model is really working fine. However, I now want to run the model on totally fresh data - say just one row of data in an excel file. I need to know the code for it and will really appreciate it if someone can help. I am somewhat new to python.  Here is the part of code I have written to create the training and test data sets from 25000 rows and train the model on training and predict on the test. However, I need the code that runs this model that uses target encoding to predict fresh data. If I need to post more code for greater clarity please let me know.</p>
  <pre><code>train_x, test_x, train_y, test_y = train_test_split(X, y, test_size=0.2)
  
  rf = RandomForestClassifier(n_jobs=-1)
  rf.fit(train_x.values, train_y.values)
  
  pred_train = rf.predict(train_x.values)
  pred = rf.predict(test_x.values)
  </code></pre>
  <p>Thanks</p>