Created
December 20, 2021 11:47
-
-
Save 1ambda/fb1566c70ed291908c8f43f63756bce6 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
case class MarketingUserRefined(userId: Int, | |
yearBirth: Int, | |
education: String, | |
income: Option[Int], | |
kidhome: Option[Int], | |
teenhome: Option[Int], | |
dtCustomer: String, | |
recency: Option[Int]) | |
val dsUserRefined = dfSelected | |
.withColumnRenamed("id", "userId") | |
.as[MarketingUserRefined] | |
val dsUserFiltered = dsUserRefined.filter(x => x.education == "Master") | |
dsUserFiltered.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment