Created
August 3, 2017 20:17
-
-
Save ryandavidhartman/b0614b93b52989168028a7b98aa3f185 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val data = Map(("a" -> Some(1)), ("b" -> None), ("c" -> 1), ("d" -> "dfd")) | |
val test1 = data.filter({case (key, value) => value != None}).collect { | |
case (key, Some(value)) => key -> value | |
case (key, value) => key -> value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment