Overlong Support Messages
Problem
You are given a DataFrame `support_message` with columns `message_id` and `body`.
Return the `message_id` of every message whose `body` is more than 20 characters long. Output one column: `message_id`.
Input data
Example rows — the live problem includes the full dataset.
support_message
| message_id | body |
|---|---|
| 1 | Hi there |
| 2 | My order has not arrived yet please help |
| 3 | Thanks for the help! |
Expected output
Your answer should return 1 row with the columns message_id.
Starter code (Pandas (Python))
import pandas as pd
def overlong_support_messages(support_message) -> pd.DataFrame:
# Your code here
return support_messageSolve this Pandas question free
Write Pandas (Python) and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock