{"id":29867065,"url":"https://github.com/jordandelbar/go-polars","last_synced_at":"2026-05-03T12:12:57.297Z","repository":{"id":277112337,"uuid":"931369894","full_name":"jordandelbar/go-polars","owner":"jordandelbar","description":"POC Go bindings library for Polars","archived":false,"fork":false,"pushed_at":"2025-09-01T13:08:40.000Z","size":63217,"stargazers_count":40,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-01T15:12:07.003Z","etag":null,"topics":["go","golang","polars"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jordandelbar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-12T06:49:24.000Z","updated_at":"2025-09-01T13:08:43.000Z","dependencies_parsed_at":"2025-02-12T07:53:34.764Z","dependency_job_id":"8753d229-bc4d-4a67-aef6-74a83609a810","html_url":"https://github.com/jordandelbar/go-polars","commit_stats":null,"previous_names":["jordandelbar/go-polars"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/jordandelbar/go-polars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordandelbar%2Fgo-polars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordandelbar%2Fgo-polars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordandelbar%2Fgo-polars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordandelbar%2Fgo-polars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jordandelbar","download_url":"https://codeload.github.com/jordandelbar/go-polars/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jordandelbar%2Fgo-polars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32568235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","polars"],"created_at":"2025-07-30T13:02:07.204Z","updated_at":"2026-05-03T12:12:57.266Z","avatar_url":"https://github.com/jordandelbar.png","language":"Go","funding_links":[],"categories":["Recently Updated","Libraries/Packages/Scripts"],"sub_categories":["[Jul 28, 2025](/content/2025/07/28/README.md)","Go"],"readme":"# go-polars\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/assets/images/go-rust.png\" width=\"300\"/\u003e\n\u003c/p\u003e\n\nThis project creates Go bindings for the Polars data manipulation library!\n\n## 🐻‍❄️ What is Polars?\nPolars is an open-source library for data manipulation, known for being one of the fastest data processing solutions on a single machine. It features a well-structured, typed API that is both expressive and easy to use.\n\nhttps://github.com/pola-rs/polars\n\n## 📦 Installation\n\n\u003e [!NOTE]\n\u003e **Build Process \u0026 Security Considerations**\n\u003e\n\u003e The GitHub Actions runners cannot compile the Polars Rust bindings due to resource constraints, so binaries are currently compiled on a local development machine. While this isn't ideal from a security perspective, we've implemented several measures to ensure transparency and verifiability:\n\u003e\n\u003e - **🔍 Reproducible builds**: All build scripts are available in [`./scripts`](./scripts) for review\n\u003e - **🔐 Checksum verification**: Each binary release includes SHA256 and MD5 checksums\n\u003e - **📋 Build transparency**: Release notes include build environment details and dependency versions\n\u003e - **🏗️ Self-compilation option**: You can always build from source using `./build.sh`\n\u003e\n\u003e **To verify a binary download:**\n\u003e ```bash\n\u003e # Download the checksum file and verify\n\u003e sha256sum -c libpolars_go-linux-amd64-v0.1.0.so.sha256\n\u003e ```\n\n### Quick Start\n\nFor the easiest setup experience, use our setup script that downloads both the package and precompiled binary:\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/jordandelbar/go-polars/main/scripts/setup.sh | sh\n```\n\nThis script will:\n- Download and set up the polars package in your project\n- Download the precompiled binary for your platform\n- Configure your Go module with the necessary replace directives\n- Create an example file to test your installation\n\n### Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/jordandelbar/go-polars/polars\"\n)\n\nfunc main() {\n    df, err := polars.ReadCSV(\"data.csv\")\n    if err != nil {\n        panic(err)\n    }\n    fmt.Println(df.String())\n}\n```\n\n### Pre-compiled Binaries\n\n✅ **Available for**:\n- Linux x86_64\n\n🚧 **Coming soon**:\n- macOS x86_64 and ARM64\n- Windows x86_64\n\n### Alternative: Build from Source\n\nIf pre-compiled binaries aren't available for your platform:\n\n**Prerequisites**:\n- **Rust**: Install from [rustup.rs](https://rustup.rs/)\n- **Build tools**: `build-essential` (Ubuntu) or equivalent\n\n```bash\ngit clone https://github.com/jordandelbar/go-polars\ncd go-polars\n./build.sh\n```\n\n## ✨ Features\n\n### Expression Operations\n\ngo-polars supports a comprehensive set of expression operations for data manipulation:\n\n#### Comparison Operations\n- `Gt(value)` - Greater than\n- `Lt(value)` - Less than\n- `Eq(value)` - Equal to\n- `Ne(value)` - Not equal to\n- `Ge(value)` - Greater than or equal to\n- `Le(value)` - Less than or equal to\n\n#### Mathematical Operations\n- `Add(expr)` / `AddValue(value)` - Addition\n- `Sub(expr)` / `SubValue(value)` - Subtraction\n- `Mul(expr)` / `MulValue(value)` - Multiplication\n- `Div(expr)` / `DivValue(value)` - Division\n\n#### Logical Operations\n- `And(expr)` - Logical AND\n- `Or(expr)` - Logical OR\n- `Not()` - Logical NOT\n\n### GroupBy and Aggregation Operations\n\ngo-polars provides powerful GroupBy functionality for data aggregation:\n\n#### GroupBy Operations\n- `GroupBy(columns...)` - Group data by one or more columns\n- `Count()` - Count rows per group\n- `Sum(column)` - Sum values per group\n- `Mean(column)` - Calculate mean per group\n- `Min(column)` - Find minimum per group\n- `Max(column)` - Find maximum per group\n- `Std(column)` - Calculate standard deviation per group\n- `Agg(expressions...)` - Custom aggregations with multiple expressions\n\n#### Aggregation Expressions\n- `Col(\"column\").Sum()` - Sum aggregation expression\n- `Col(\"column\").Mean()` - Mean aggregation expression\n- `Col(\"column\").Min()` - Minimum aggregation expression\n- `Col(\"column\").Max()` - Maximum aggregation expression\n- `Col(\"column\").Std()` - Standard deviation aggregation expression\n- `Count()` - Count aggregation expression\n\n#### Basic Usage Examples\n\n```go\nimport \"github.com/jordandelbar/go-polars/polars\"\n\n// Load data\ndf, err := polars.ReadCSV(\"data.csv\")\n\n// Comparison operations\nfiltered := df.Filter(polars.Col(\"age\").Gt(25))\nequals := df.Filter(polars.Col(\"score\").Eq(100))\n\n// Mathematical operations\ndf = df.WithColumns(\n    polars.Col(\"price\").MulValue(1.1).Alias(\"price_with_tax\"),\n    polars.Col(\"length\").Add(polars.Col(\"width\")).Alias(\"perimeter\"),\n)\n\n// Logical operations\ncomplex := df.Filter(\n    polars.Col(\"age\").Gt(18).And(polars.Col(\"score\").Ge(80)),\n)\n\n// Chaining operations\nresult := df.\n    Filter(polars.Col(\"age\").Gt(18).And(polars.Col(\"score\").Ge(80))).\n    WithColumns(polars.Col(\"salary\").MulValue(1.05).Alias(\"new_salary\")).\n    Select(polars.Col(\"name\"), polars.Col(\"new_salary\"))\n\n// GroupBy operations\ngroupedData := df.GroupBy(\"department\")\ncountResult := groupedData.Count()\navgSalary := groupedData.Mean(\"salary\")\n\n// Complex aggregations\nstats := df.GroupBy(\"department\").Agg(\n    polars.Col(\"salary\").Mean().Alias(\"avg_salary\"),\n    polars.Col(\"salary\").Max().Alias(\"max_salary\"),\n    polars.Col(\"salary\").Min().Alias(\"min_salary\"),\n    polars.Count().Alias(\"employee_count\"),\n)\n```\n\n## 🚀 Examples \u0026 Quick Start\n\n### Basic Example\nGet started with simple DataFrame operations:\n```bash\nmake run-basic-example\n```\n\n### Expression Example\nRun the full-featured example with complex operations:\n```bash\nmake run-expressions-example\n```\n\n### GroupBy Example\nRun the GroupBy and aggregation operations demo:\n```bash\nmake run-groupby-example\n```\n\n### Available Make Commands\n- `make local-build` - Build the library from source (smart build)\n- `make force-build` - Force rebuild even if up to date\n- `make quick-build` - Smart build (only rebuilds if needed)\n- `make run-basic-example` - Run basic DataFrame demo\n- `make run-expressions-example` - Run expression operations demo\n- `make run-groupby-example` - Run GroupBy and aggregation demo\n- `make run-all-examples` - Run all examples\n\n## 🧪 Testing\n\n```bash\n# Run all tests\nmake test\n\n# Quick test run\nmake test-short\n\n# Test specific functionality\nmake test-groupby\n\n# Performance benchmarks\nmake test-bench\n\n# Generate coverage report\nmake test-coverage\n\n# View coverage in browser\nmake view-coverage\n\n# Development cycle (quick build + short tests)\nmake dev\n```\n## 📋 To do\n\n- [x] Join operations\n- [ ] Data type conversions: `Cast()`\n- [ ] Schema inspection\n- [ ] Null handling: `IsNull()`, `IsNotNull()`, `FillNull()`\n- [ ] Advanced Aggregations: `Median()`,...\n- [ ] Window functions\n- [ ] Pivot \u0026 Reshape options\n- [ ] Additional I/O Formats: `ReadJSON()`, `WriteJSON()`,...\n- [ ] When/Otherwise logic\n- [ ] Data Quality \u0026 Validation: `IsEmpty()`,...\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Build locally: `./build.sh`\n3. Test your changes: `make test`\n4. Submit a pull request\n\n## 📄 License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordandelbar%2Fgo-polars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordandelbar%2Fgo-polars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordandelbar%2Fgo-polars/lists"}