Praveen-bpk21
New Contributor II

@Aidonis 

You can try this as well:
flatten-spark-dataframe · PyPI
This also allows for specific level of flattening.