Created
November 2, 2017 16:38
-
-
Save onastavchuk/e4ff95f95a42aa4c07039d52260e9cb6 to your computer and use it in GitHub Desktop.
This file contains 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 days = df.select( | |
col("host"), | |
month(col("time")).alias("month"), | |
dayofmonth(col("time")).alias("day") | |
).distinct() | |
days.groupBy("month", "day") | |
.count() | |
.sort(desc("count")) | |
.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment