I have a pyspark dataframe consisting of one column, called json, where each row is a unicode string of json. I\'d like to parse each row and return a new dataf
json
Here's a concise (spark SQL) version of @nolan-conaway's parseJSONCols function.
parseJSONCols
SELECT explode( from_json( concat('{"data":', '[{"a": 1.0,"b": 1},{"a": 0.0,"b": 2}]', '}'), 'data array>' ).data) as data;
PS. I've added the explode function as well :P
You'll need to know some HIVE SQL types