[Solved] Groupby fill missing values in dataframe based on average of previous values available and next value available
Perhaps this is helpful – Load the test data df2.show(false) df2.printSchema() /** * +—–+—–+ * |class|score| * +—–+—–+ * |A |null | * |A |46 | * |A |null | * |A |null | * |A |35 | * |A |null | * |A |null | * |A |null | * |A |46 | * … Read more