Normalise Null Tokens

Medium
Data Quality
Nulls
Cleaning
CSV
Spotify
Netflix

Normalise Null Tokens

A review export writes missing scores as NULL, N/A, - or an empty field - in any letter case. Treat all four as missing.

Return review_id, score, quality sorted by review_id:

  • score is an int, or null when the raw token is missing
  • quality is 'missing' for those rows and 'complete' otherwise

Normalise with upper(trim(...)) before comparing, so n/a and N/A behave the same.

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

Input files

1 File
Loaded automatically

These files are loaded into this browser when you run. Their paths are handed to your code as the third argument: solve(spark, dfs, paths). Read one with spark.read.csv(paths['users'], header=True), or skip the read and use dfs['users'].

paths[reviews]
csv
datasets/schema/reviews_nulls.csv
review_id(string)
score(string)
Browser engine
Local files
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.