Skip to content

Instantly share code, notes, and snippets.



Last active Aug 1, 2020
What would you like to do?
Back to the Machine Learning fundamentals: How to write code for Model deployment (Part 3/3)
def encoder(data, var, mapping):
Encode all variables for training
:params: data, var, mapping
:return: DataFrame
if var not in data.columns.values.tolist():
return data[var].map(mapping)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.