jxu opened a new issue, #55632: URL: https://github.com/apache/spark/issues/55632
https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.json_tuple.html Currently, you have to specify the field names you want twice: first for extracting the fields and second for aliasing them from the default "c0", "c1", etc. ```python json_tuple(df.jstring, 'f1', 'f2').alias("f1", "f2") ``` I think you can put the field names into a tuple and unpack them with *, but it would be a nice convenience if the column names took on what the fields were automatically. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
