Average Delivery Minutes

Easy
Aggregation

Average Delivery Minutes

The deliveries table contains delivery durations in minutes.

Return one row with avg_delivery_minutes, the average duration rounded to 2 decimal places.

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.deliveries6 rows
delivery_id (int)minutes (int)
112
218
325
430
522
617

Return these columns

avg_delivery_minutes(double)

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.