PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates data wrangling and aggregation competency in pandas, focusing on group-level aggregation and filtering of engagement metrics across users and story types.

  • Medium
  • Snapchat
  • Data Manipulation (SQL/Python)
  • Data Scientist

Compute User Group Stories and Aggregate Story Engagement

Company: Snapchat

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

user_story_engagement +---------+----------+------------+------------+-------+-------+ | user_id | story_id | story_type | created_at | views | likes | +---------+----------+------------+------------+-------+-------+ | 101 | 555 | regular | 2023-07-01 | 8 | 2 | | 102 | 556 | group | 2023-07-02 | 15 | 4 | | 101 | 557 | group | 2023-07-03 | 5 | 1 | | 103 | 558 | regular | 2023-07-03 | 20 | 10 | +---------+----------+------------+------------+-------+-------+ ##### Scenario Python (pandas) task on story-engagement data to assess data wrangling skills. ##### Question Using pandas, compute the number of group stories each user has posted and return only users with at least three group stories. Aggregate total views and likes per story_type (regular vs group). ##### Hints Use groupby, size/count, sum, reset_index, filtering with query or boolean masks.

Quick Answer: This question evaluates data wrangling and aggregation competency in pandas, focusing on group-level aggregation and filtering of engagement metrics across users and story types.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Compute same-day acceptance metrics last week - Snapchat (Medium)
  • Compute CTR and metrics with pandas - Snapchat (Medium)
  • Compute User Retention and Analyze Event Data - Snapchat (Medium)
  • Monitor Friend-Request System for Quality and Abuse - Snapchat (Medium)