Question:
I have a dataframe in pyspark which looks like
I want something like this
Basically, I want the values of my dictionary/Map column to be split and assigned to each of the keys.
Either Pyspark or pandas.
For pandas my df looks like this
MY APPROACH
I converted the PYSPARK DF to Pandas Df as I don’t have much experience with Pyspark and new to it, A direct pyspark help will be much appreciated, else even pandas implementation would be great.
The code is not splitting the keys and assigning values.
Edit
Answer:
Using only pyspark:
If you have better answer, please add a comment about this, thank you!