AnalystPath

Usernames Chosen More Than Once

PandasEasyJunior level~10 min

Problem

**DataFrame: `Signup`**

| Column | Type |
|-----------|---------|
| signup_id | int |
| username | varchar |

`signup_id` is unique. Each row is one signup attempt and the username that was entered.

Return a DataFrame with one column `Username` listing every `username` that appears **more than once**. Any order.

**Example** — if `maple` was entered twice and `cedar` once, only `maple` is returned.

Input data

Example rows — the live problem includes the full dataset.

Signup
signup_idusername
1maple
2cedar
3maple

Expected output

Your answer should return 1 row with the columns Username.

Starter code (Pandas (Python))

import pandas as pd

def repeated_usernames(Signup) -> pd.DataFrame:
    # Your code here
    return Signup

Solve 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

Related Pandas questions