Video introduction to model publishing

 

 

If you want to follow along with the example shown in the video, you can copy the snippets below:

 

  1. Command to fetch zipcode lookup table:
    wget https://s3-us-west-2.amazonaws.com/dominodatalab-fzd/free-zipcode-database.csv
  2. Contents of zip_pop.py script used in the model:
    import pandas as pd
    zips = pd.read_csv("free-zipcode-database.csv")
    
    def zip_pop (my_zip):
        my_zip_pop = zips.loc[zips['Zipcode'] == my_zip]['EstimatedPopulation'].values[0]
        return my_zip_pop

 

 

To learn more about models, read:

Was this article helpful?
0 out of 0 found this helpful