Employees Without a Manager

Easy
Filtering
Data Cleaning

Employees Without a Manager

The employees table contains employee IDs and manager IDs. Managers are also employees, but some employees have no manager on record.

Return employee_id, employee_name for employees whose manager_id is null. Sort by employee_id ascending.

Browser Engine: Evaluates PySpark DataFrame & SQL logic locally in Pyodide WebAssembly.

Input data

1 DataFrame

These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].

df.employees5 rows
employee_id (int)employee_name (string)manager_id (int)
1Aaravnull
2Bela1
3Chen1
4Dianull
5Eli3

Return these columns

employee_id(int)
employee_name(string)

Column names and order must match. Sort order is specified in the question.

Browser engine
Loading Python editor…
Click Run to try the sample cases, or Submit to check the hidden cases. First run caches the browser Python engine (~8–15s once); all code stays on your device.