I have a PySpark dataframe with single column.
| Rank
|----------
| 10
| 10
| null
| null
| 15
| null
| 20
| null
| null
| 15
| null
| 10
I want to impute the missing values using forward fill like pandas ffill() function.
Desired Output
| Rank
|----------
| 10
| 10
| 10
| 10
| 15
| 15
| 20
| 20
| 20
| 15
| 15
| 10
Disclaimer: I have some some solutions in stackoverflow but they wont work when you only have a single column as input.