Skip to content

Instantly share code, notes, and snippets.

@NeerajBhadani
Created May 25, 2020 10:13
Show Gist options
  • Save NeerajBhadani/534860aa5fc6d5428903889a13f96467 to your computer and use it in GitHub Desktop.
Save NeerajBhadani/534860aa5fc6d5428903889a13f96467 to your computer and use it in GitHub Desktop.
map_from_arrays
val map_from_arr_df = full_df
.withColumn("result", map_from_arrays($"array_col1", $"array_col2"))
.drop("col1")
map_from_arr_df.show(truncate=false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment