PySpark converting a column of type ‘map’ to multiple columns in a dataframe
Input I have a column Parameters of type map of the form: >>> from pyspark.sql import SQLContext >>> sqlContext = SQLContext(sc) >>> d = [{'Parameters': {'foo': '1', 'bar': '2', 'baz': 'aaa'}}] >>> df = sqlContext.createDataFrame(d) >>> df.collect() [Row(Parameters={'foo': '1', 'bar': '2', 'baz': 'aaa'})] Output I want to reshape it in pyspark so that all the … Read more