July 2017
Beginner to intermediate
715 pages
17h 3m
English
You might notice that the code we just wrote is quite verbose. Of course, it is possible to put it inside a helper function and call it when needed, but there is another more concise way of computing these statistics--with joinery and its DataFrames.
In Joinery, the DataFrame object has a method called describe, which creates a new DataFrame with summary statistics:
List<RankedPage> pages = Data.readRankedPages(); DataFrame<Object> df = BeanToJoinery.convert(pages, RankedPage.class); df = df.retain("bodyContentLength", "titleLength", "numberOfHeaders"); DataFrame<Object> describe = df.describe(); System.out.println(describe.toString());
In the preceding code, Data.readRankedPages is a helper method that reads JSON data and converts ...
Read now
Unlock full access