Netflix Season Runtime Hours

Easy
Aggregation
Arithmetic
Media
Netflix

Netflix Season Runtime Hours

A Netflix-style content team reports the total runtime of each show.

Return show_id, show_name, runtime_hours, where runtime is the sum of episode minutes divided by 60, rounded to 2 decimal places. Sort by show_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.episodes8 rows
show_id (string)show_name (string)episode_id (int)runtime_minutes (int)
S1Midnight Heist152
S1Midnight Heist248
S2City of Kites160
S2City of Kites258
S2City of Kites362
S3Signal Lost145
S4The Quiet Kitchen130
S4The Quiet Kitchen235

Return these columns

show_id(string)
show_name(string)
runtime_hours(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.