JDFrame/SDFrame Java DataFrame Library: API Guide and Usage Examples

This article introduces the JDFrame and SDFrame Java libraries that provide DataFrame‑like, semantic stream processing APIs, demonstrates how to add Maven dependencies, shows quick‑start examples, detailed CRUD, filtering, grouping, sorting, joining, pagination, and other advanced operations with full code snippets for developers.

Architecture Digest
Architecture Digest
Architecture Digest
JDFrame/SDFrame Java DataFrame Library: API Guide and Usage Examples

The JDFrame and SDFrame libraries bring a DataFrame‑style, semantic API to Java 8 streams, allowing developers to write concise, SQL‑like data manipulation code without hard‑coding field names. The article begins with a free book promotion and then explains the motivation for creating a JVM‑level DataFrame tool.

Quick Start – Add the Maven dependency:

<dependency>
    <groupId>io.github.burukeyou</groupId>
    <artifactId>jdframe</artifactId>
    <version>0.0.6</version>
</dependency>

Then create a list of Student objects and use the library to perform queries such as counting students aged 9‑16 and retrieving the top two schools by total score.

Example Query :

SDFrame<FI2<String, BigDecimal>> sdf2 = SDFrame.read(studentList)
    .whereNotNull(Student::getAge)
    .whereBetween(Student::getAge, 9, 16)
    .groupBySum(Student::getSchool, Student::getScore)
    .sortDesc(FI2::getC2)
    .cutFirst(10);

sdf2.show();

The output shows the aggregated scores per school.

API Overview – The library provides methods for matrix viewing, filtering ( whereBetween, whereEq, whereLike), distinct operations, grouping and aggregation ( groupBySum, groupByMax, groupByCount), sorting ( sortDesc, sortAsc), joining ( join, leftJoin, rightJoin), pagination, row numbering, and replenishing missing dimension values.

Additional features include percentage conversion, partitioning a list into sub‑lists, and setting default numeric scale. The article concludes with a comparison between SDFrame (lazy, stream‑like) and JDFrame (eager, DataFrame‑like) and invites readers to suggest further API ideas.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaAPITutorialStreamdataframeJDFrameSDFrame
Architecture Digest
Written by

Architecture Digest

Focusing on Java backend development, covering application architecture from top-tier internet companies (high availability, high performance, high stability), big data, machine learning, Java architecture, and other popular fields.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.