Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
arr_slice_posexplode
// create an array column with few values to explode.
val temp_df = df.withColumn("slice_col", slice($"array_col2", 1, 2))
.drop("array_col2")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment