Skip to content

Instantly share code, notes, and snippets.

@NeerajBhadani
Created May 25, 2020 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NeerajBhadani/f4a67ee726d81aae694c4a026b7fbc2c to your computer and use it in GitHub Desktop.
Save NeerajBhadani/f4a67ee726d81aae694c4a026b7fbc2c to your computer and use it in GitHub Desktop.
slice
val arr_slice_df = df.withColumn("result", slice($"array_col2", 2, 3))
arr_slice_df.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment