Fill in missing values based on series and populate second row based on previous or next row in pyspark

萝らか妹 提交于 2020-03-25 17:50:14

问题


I have a csv with 4 columns. The file contains some missing rows based on the series.

Input:-

No  A   B   C
1   10  50  12
3   40  50  12
4   20  60  15
6   80  80  18

Output:-

No  A   B   C
1   10  50  12
2   10  50  12
3   40  50  12
4   20  60  15
5   20  60  15
6   80  80  18

I need pyspark code to generate the above output.

来源:https://stackoverflow.com/questions/60681807/fill-in-missing-values-based-on-series-and-populate-second-row-based-on-previous

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!