Created
April 26, 2019 16:05
-
-
Save joseph-allen/d138f5900a7cd014b71aa34c2d2a5146 to your computer and use it in GitHub Desktop.
Demo of loading a pickle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
import pandas as pd | |
import numpy as np | |
# Create sample data | |
df = pd.DataFrame(columns=['A','B','C']) | |
df.loc[0] = [12,42,'test'] | |
# load stored model | |
loaded_model = pickle.load(open('Pickled_Model.pkl', 'rb')) | |
result = loaded_model.predict(df) | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment