Week 59 – Intermediate

Snowpark ML is another public preview feature we’re very excited to get playing with. Now, data science skills are specialist skills, and so we don’t want to go into too hard here, so we’ve made this as easy as we can.

(1) Ingest the data

(2) Create a connection.json file that looks a little like the one below

  "account"            : "",
  "user"               : "",
  "password"           : "",
  "role"               : "",
  "warehouse"          : "",
  "database"           : "",
  "schema"             : ""

(3) Connect to your data as in the code below

connection_parameters = json.load(open('credentials/connection.json'))
session = Session.builder.configs(connection_parameters).create()

(4) Fill in the gaps

#Load table
week59 = session.table('week59').to_pandas()

# Initialize the DecisionTreeClassifier with column names
model = 

# Fit the model to the data

# Make predictions

# Display the predictions

Your result should look something like:

Remember, if you want to participate:

  1. Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to ‘REGISTER
  2. Post your code to GitHub and make it publicly available (Check out our guide if you don’t know how to here)
  3. Post the URL in the comments of the challenge

2 responses to “Week 59 – Intermediate”

  1. mat avatar

    Thank you for pointing out new features. This is my default place for what’s new in Snowflake

    • Solution URL – https://github.com/mateusz-kmon/frostyfridaychallenges/blob/main/w59.py
  2. ChrisHastie avatar

    Playing catch-up as I was on leave last week. Thanks for another fun new challenge, I hadn’t had a chance to play with Snowpark ML before!

    • Solution URL – https://github.com/ChrisHastieIW/Frosty-Friday

Leave a Reply