Pergunta de entrevista da empresa Citi

Can you write a PySpark code snippet to load a JSON file and perform a filter operation on a column named H?to find records h greater than 30

Resposta da entrevista

Sigiloso

6 de mar. de 2025

df = spark.read.json("path to your json file") filtered.df = df.filter(col('H') > 30) filtered.df.show()