Write SQL and Python, run instantly in your browser, and track your progress.
You are a Data Scientist at Meta. The Content Strategy team needs to calculate engagement potential scores for posts to prioritize content moderation and recommendation algorithms. Create a multi-factor scoring system using apply with axis=1 that considers content type, visibility, and post status.
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_text | object |
| content_type |
You are a Data Scientist at Meta. The Content Strategy team needs to calculate engagement potential scores for posts to prioritize content moderation and recommendation algorithms. Create a multi-factor scoring system using apply with axis=1 that considers content type, visibility, and post status.
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_text | object |
| content_type |
| object |
| object |
| link_url | object |
| link_url | object |
| visibility | object |
| visibility | object |
| created_at | object |
| created_at | object |
| status | object |
| status | object |
| post_id | user_id | content_text | content_type | link_url | visibility | created_at | status |
|---|---|---|---|---|---|---|---|
| 1 | 1 | Answering your questions about entrepreneurship | video | followers | 2025-05-28 17:39:24 |
| post_id | user_id | content_text | content_type | link_url | visibility | created_at | status |
|---|---|---|---|---|---|---|---|
| 1 | 1 | Answering your questions about entrepreneurship | video | followers | 2025-05-28 17:39:24 |
| post_id | content_type | visibility | status | engagement_score | reach_category |
|---|---|---|---|---|---|
| 1 | video | followers | published | 10 | High Reach |
| 2 | link | public | published | 6 | Medium Reach |
| 3 | image |
| post_id | content_type | visibility | status | engagement_score | reach_category |
|---|---|---|---|---|---|
| 1 | video | followers | published | 10 | High Reach |
| 2 | link | public | published | 6 | Medium Reach |
| 3 | image |
Showing first 5 of 230 rows.
Showing first 5 of 230 rows.
1. Data Selection:
2. Transformation:
3. Output:
1. Data Selection:
2. Transformation:
3. Output:
| published |
| published |
| 2 | 1 | For everyone asking about technology... | link | https://example.com/41544 | public | 2025-04-20 09:23:49 | published |
| 2 | 1 | For everyone asking about technology... | link | https://example.com/41544 | public | 2025-04-20 09:23:49 | published |
| 3 | 1 | Sunset vibes from Austin | image | followers | 2025-06-02 01:35:31 | published |
| 3 | 1 | Sunset vibes from Austin | image | followers | 2025-06-02 01:35:31 | published |
| 4 | 2 | What's your take on web development? | poll | followers | 2025-07-19 11:27:33 | published |
| 4 | 2 | What's your take on web development? | poll | followers | 2025-07-19 11:27:33 | published |
| 5 | 2 | Morning coffee and good vibes | image | followers | 2025-08-04 14:31:30 | hidden |
| 5 | 2 | Morning coffee and good vibes | image | followers | 2025-08-04 14:31:30 | hidden |
| followers |
| followers |
| published |
| published |
| 8 |
| 8 |
| Medium Reach |
| Medium Reach |
| 4 | poll | followers | published | 6 | Medium Reach |
| 4 | poll | followers | published | 6 | Medium Reach |
| 5 | image | followers | hidden | 4 | Low Reach |
| 5 | image | followers | hidden | 4 | Low Reach |