I'm a beginner in Spark and I want to calculate the average of number per name.
I have a JSON file with this information
df = spark.read.json("myjson.json") df.select(avg(df["number"]), df["name"]).groupBy("name").show()
But I'm doing it wrong..
How can I solve my problem?
Thanks a lot