Skip to content

Instantly share code, notes, and snippets.

@Hugheym
Created April 28, 2020 02:35
Show Gist options
  • Select an option

  • Save Hugheym/0d57d942f27b2bdef000fa64ecbf78b6 to your computer and use it in GitHub Desktop.

Select an option

Save Hugheym/0d57d942f27b2bdef000fa64ecbf78b6 to your computer and use it in GitHub Desktop.
To filter Nan and Infinity values out of DataFrame.
df.filter(!$"colName".isin(Double.NaN, Double.PositiveInfinity, Double.NegativeInfinity))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment