Created
May 25, 2020 10:17
-
-
Save NeerajBhadani/ca56a076988eab8c0415084827e9765c to your computer and use it in GitHub Desktop.
arr_explode_slice
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
// create an array column with few values to explode. | |
val temp_df = df.withColumn("slice_col", slice($"array_col2", 1, 2)) | |
.drop("array_col2") | |
temp_df.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment