Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val df = ... // some data frame
- df.groupBy("A").agg(
- max("B").where("B").less(10), // there is no such method as `where` :(
- max("C").where("C").less(5)
- )
- | A | B | C |
- | 1| 14| 4|
- | 1| 9| 3|
- | 2| 5| 6|
- |A|max(B)|max(C)|
- |1| 9| 4|
- |2| 5| null|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement