Snowpark Pandas! Finally, our love-hate relationship with Pandas becomes one completely full of love as we use familiar, well-known syntax on the distributed Snowflake system.
This week’s challenge tasks you with using Snowpark Pandas to answer 5 rapid-fire questions!
Below is your start-up SQL code:
create or replace stage frosty_stage url = 's3://frostyfridaychallenges/challenge_102/';
Then open up a notebook and place the following in the first cell:
import modin.pandas as pd
import snowflake.snowpark.modin.plugin
from snowflake.snowpark.context import get_active_session
session = get_active_session()
clothes_shop_df = pd.read_csv('@frosty_stage/clothes_shop_purchases.csv')
After that, you’re ready to answer the following 4 questions!
- At what hour of the day are the majority of our sales?
- Which server sold the most?
- What is the total price like if we deduct 20% for tax on the first five items?
- What would the biggest till number be if we merged tills 4 and 5?
Answers
1:
![](https://frostyfriday.org/wp-content/uploads/2024/07/Screenshot-2024-07-19-at-07.47.09-edited.png)
2:
![](https://frostyfriday.org/wp-content/uploads/2024/07/Screenshot-2024-07-19-at-07.47.20-edited.png)
3:
![](https://frostyfriday.org/wp-content/uploads/2024/07/Screenshot-2024-07-19-at-07.47.29-e1721753960315-1024x254.png)
4:
![](https://frostyfriday.org/wp-content/uploads/2024/07/Screenshot-2024-07-23-at-18.23.55.png)