Skip to content

Instantly share code, notes, and snippets.

@marcovivero
Created July 31, 2015 00:47
Show Gist options
  • Save marcovivero/e133b36017fd9ec38f3e to your computer and use it in GitHub Desktop.
Save marcovivero/e133b36017fd9ec38f3e to your computer and use it in GitHub Desktop.
def getUniqueString(
df : DataFrame,
col : String
) : Array[String] = {
df.select(col).na.drop.dropDuplicates.map(_.getString(0)).collect
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment