Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Last active May 10, 2017 00:04
Show Gist options
  • Select an option

  • Save dgadiraju/59d8850b9b40f850b52950727b07edb2 to your computer and use it in GitHub Desktop.

Select an option

Save dgadiraju/59d8850b9b40f850b52950727b07edb2 to your computer and use it in GitHub Desktop.
os.groupBy(x => x.orderStatus)
//To get count by order status
os.groupBy(x => x.orderStatus).map(x => (x._1, x._2.size)).foreach(println)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment