Check if columns exist and if not, create and fill with NaN using PySpark
I have a pyspark dataframe and a separate list of column names. I want to check and see if any of the list column names are missing, and if they are, I want to create them and fill with null values. Is there a straightforward way to do this in pyspark? I can do it… Read More Check if columns exist and if not, create and fill with NaN using PySpark