Created
December 21, 2021 23:35
-
-
Save 1ambda/25a1efd03b411d1836be705ae708f42c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dfRecovered = dfCategory\ | |
.withColumn("category_id", get_json_object(col("category"), "$.category_id"))\ | |
.withColumn("category_code", get_json_object(col("category"), "$.category_code")) | |
dfRecovered.printSchema() | |
dfRecovered.show(truncate=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment