8000 GitHub - moustafa-nasr/Fahmatrix: Fahmatrix is a lightweight, modern Java library for working with tabular data, inspired by Python's Pandas and rooted in the idea of making data understanding (fahm) easy on the JVM.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fahmatrix is a lightweight, modern Java library for working with tabular data, inspired by Python's Pandas and rooted in the idea of making data understanding (fahm) easy on the JVM.

License

Notifications You must be signed in to change notification settings

moustafa-nasr/Fahmatrix

Repository files navigation

Fahmatrix Version

Docs Java Platform License

Star Fork Watch

Tweet

Fahmatrix is a lightweight, modern Java library for working with tabular data — inspired by Python’s Pandas, but designed specifically for the JVM. It’s early in development, but already offers a clean API for loading, exploring, and manipulating data with zero external dependencies.

Ideal for small projects, backend systems, or embedded environments like Android, Fahmatrix is built to bring structured data handling to every corner of the Java ecosystem.

🚀 Intuitive API for tabular data
📄 Easy CSV, Xlsx, Ods, Json reading and previewing
📄 Easy CSV, Xlsx, Ods, Json writing
🔍 Row filtering and column selection
📊 Aggregations, grouping, and sorting (coming soon)
🧩 No external dependencies (for now)


🔧 Installation

📦 Using GitHub Releases

Visit Releases and download the latest JAR file.

Include it manually in your project’s classpath or use Maven/Gradle if you're pulling from GitHub Packages (to be added in future versions).

If you're building locally:

git clone https://github.com/moustafa-nasr/fahmatrix.git
cd fahmatrix
./gradlew build

or Test online

Open In Colab


📚 Simple Example Usage

import com.fahmatrix.DataFrame;

public class Main {
    public static void main(String[] args) {
        // read csv file
        DataFrame df = DataFrame.readCSV("data.csv");
        // pretty print data in system console
        df.print();
        // Pretty Print Data Summary in System Console
        // count, min, max, sum, mean ,median, standard deviation, 25%, 50%, 70%
        df.describe()
        // select certain rows and colums
        DataFrame result = df.select().rows(new int[]{1,2,3,5,6,8,110,10000,99}).columns(new int[]{1,2,5}).get();
        // save the final data as JSON format 
        result.writeJson("output.json");
        // save the final data as Microsoft Excel
        result.writeXlsx("output.xlsx");
        // save the final data as OpenDocument Spreadsheet
        result.writeOds("output.ods");
        // pretty print the last 3 rows
        result.tail(3).print();
    }
}

🆚 Simple Comparison

Library Mean Std Dev Notes
Fahmatrix Pure Java
Tablesaw More dependencies
Apache Arrow Requires setup
Pandas Python-only

📜 Docs

You can find compiled Java Docs over here


✨ Features

  • Load CSV, JSON, Microsoft Excel,Open office ODS files into DataFrame
  • Save CSV, JSON, Microsoft Excel,Open office ODS files
  • Pretty-print data to console
  • View top rows with head() or bottom ones with tail()
  • Tranculate Data
  • Aggregations (count, min, max, sum, mean ,median, standard deviation, 25%, 50%, 70%, custom percentage)

Coming Soon:

  • Filter data by arithmetic operations (gt, lt, eq, neq)
  • Filter data by Logic operations (and, or, not)
  • Filter data by String operations (contains, equal, equal ignore case)
  • GroupBy and pivot tables
  • Nested JSON Data
  • Data import/export for HTML, Xml, Parquet and more ..
  • Type inference and conversion
  • DSLInterpreter for SQL language lovers

💡 Why Fahmatrix?

Java has long lacked a clean, expressive DataFrame API — especially one that feels at home on the JVM.

Fahmatrix is an early-stage project that brings together data clarity (fahm) and structured thinking (matrix) to offer a lightweight, embeddable solution for tabular data processing in Java. Inspired by the elegance of tools like Pandas, Fahmatrix is built from the ground up to serve Java developers — whether you're building small utilities, backend services, or Android apps.

It’s still early days, but the goal is clear: a fast, intuitive, dependency-free DataFrame library that works where Java works.


🙌 Support This Project

If you find Fahmatrix useful, consider sponsoring me to help support ongoing development, documentation, and future features.


📝 License

MIT License. Use it freely in your projects.

About

Fahmatrix is a lightweight, modern Java library for working with tabular data, inspired by Python's Pandas and rooted in the idea of making data understanding (fahm) easy on the JVM.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 
0