{"id":13672717,"url":"https://github.com/pola-rs/nodejs-polars","last_synced_at":"2026-01-12T16:18:20.670Z","repository":{"id":50694294,"uuid":"519710571","full_name":"pola-rs/nodejs-polars","owner":"pola-rs","description":"nodejs front-end of polars","archived":false,"fork":false,"pushed_at":"2025-04-21T16:29:44.000Z","size":57020,"stargazers_count":533,"open_issues_count":22,"forks_count":50,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-21T17:35:50.150Z","etag":null,"topics":["polars"],"latest_commit_sha":null,"homepage":"https://pola-rs.github.io/nodejs-polars/","language":"TypeScript","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/pola-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"ritchie46,universalmind303"}},"created_at":"2022-07-31T07:41:30.000Z","updated_at":"2025-04-21T16:29:05.000Z","dependencies_parsed_at":"2023-02-10T10:45:24.995Z","dependency_job_id":"19d52168-740c-4a3d-9277-f99044e80e26","html_url":"https://github.com/pola-rs/nodejs-polars","commit_stats":{"total_commits":207,"total_committers":25,"mean_commits":8.28,"dds":"0.47342995169082125","last_synced_commit":"093d4967b3da6e39a8239bf13155587d5941fe99"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pola-rs%2Fnodejs-polars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pola-rs%2Fnodejs-polars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pola-rs%2Fnodejs-polars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pola-rs%2Fnodejs-polars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pola-rs","download_url":"https://codeload.github.com/pola-rs/nodejs-polars/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251219600,"owners_count":21554444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["polars"],"created_at":"2024-08-02T09:01:45.311Z","updated_at":"2026-01-12T16:18:20.664Z","avatar_url":"https://github.com/pola-rs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ritchie46,universalmind303"],"categories":["TypeScript","Libraries/Packages/Scripts","Polars Bindings"],"sub_categories":["Node.js"],"readme":"# Polars\n\nPolars: Blazingly fast DataFrames in Rust, Python, Node.js, R and SQL\n\n[![rust docs](https://github.com/pola-rs/nodejs-polars/actions/workflows/docs.yaml/badge.svg)](https://github.com/pola-rs/nodejs-polars/actions/workflows/docs.yaml/)\n[![Build and test](https://github.com/pola-rs/nodejs-polars/actions/workflows/test-js.yaml/badge.svg)](https://github.com/pola-rs/nodejs-polars/actions/workflows/test-js.yaml)\n[![](https://img.shields.io/crates/v/polars.svg)](https://crates.io/crates/polars)\n[![PyPI Latest Release](https://img.shields.io/pypi/v/polars.svg)](https://pypi.org/project/polars/)\n[![NPM Latest Release](https://img.shields.io/npm/v/nodejs-polars.svg)](https://www.npmjs.com/package/nodejs-polars)\n\nDocumentation: [Node.js](https://pola-rs.github.io/nodejs-polars/index.html)\n-[ Rust](https://docs.rs/polars/latest/polars/)\n-[ Python](https://pola-rs.github.io/polars/py-polars/html/reference/index.html)\n-[ R](https://rpolars.github.io/index.html)\n|StackOverflow: [ Node.js](https://stackoverflow.com/questions/tagged/nodejs-polars)\n-[ Rust](https://stackoverflow.com/questions/tagged/rust-polars)\n-[ Python](https://stackoverflow.com/questions/tagged/python-polars)\n| [User Guide](https://pola-rs.github.io/polars/)\n| [Discord](https://discord.gg/4UfP5cfBE7)\n\n#### Note: This library is intended to work only with server side JS/TS (Node, Bun, Deno). For browser please see [js-polars](https://github.com/pola-rs/js-polars)\n\n## Usage\n\n### Importing\n\n```js\n// esm\nimport pl from 'nodejs-polars';\n\n// require\nconst pl = require('nodejs-polars'); \n```\n\n### Series\n\n```js\n\u003e const fooSeries = pl.Series(\"foo\", [1, 2, 3])\n\u003e fooSeries.sum()\n6\n\n// a lot operations support both positional and named arguments\n// you can see the full specs in the docs or the type definitions\n\u003e fooSeries.sort(true)\n\u003e fooSeries.sort({descending: true})\nshape: (3,)\nSeries: 'foo' [f64]\n[\n        3\n        2\n        1\n]\n\u003e fooSeries.toArray()\n[1, 2, 3]\n\n// Series are 'Iterables' so you can use javascript iterable syntax on them\n\u003e [...fooSeries]\n[1, 2, 3]\n\n\u003e fooSeries[0]\n1\n\n```\n\n### DataFrame\n\n```js\n\u003econst df = pl.DataFrame(\n...   {\n...     A: [1, 2, 3, 4, 5],\n...     fruits: [\"banana\", \"banana\", \"apple\", \"apple\", \"banana\"],\n...     B: [5, 4, 3, 2, 1],\n...     cars: [\"beetle\", \"audi\", \"beetle\", \"beetle\", \"beetle\"],\n...   }\n... )\n\u003e df.sort(\"fruits\").select(\n...     \"fruits\",\n...     \"cars\",\n...     pl.lit(\"fruits\").alias(\"literal_string_fruits\"),\n...     pl.col(\"B\").filter(pl.col(\"cars\").eq(pl.lit(\"beetle\"))).sum(),\n...     pl.col(\"A\").filter(pl.col(\"B\").gt(2)).sum().over(\"cars\").alias(\"sum_A_by_cars\"),\n...     pl.col(\"A\").sum().over(\"fruits\").alias(\"sum_A_by_fruits\"),\n...     pl.col(\"A\").reverse().over(\"fruits\").flatten().alias(\"rev_A_by_fruits\")\n...   )\nshape: (5, 8)\n┌──────────┬──────────┬──────────────┬─────┬─────────────┬─────────────┬─────────────┐\n│ fruits   ┆ cars     ┆ literal_stri ┆ B   ┆ sum_A_by_ca ┆ sum_A_by_fr ┆ rev_A_by_fr │\n│ ---      ┆ ---      ┆ ng_fruits    ┆ --- ┆ rs          ┆ uits        ┆ uits        │\n│ str      ┆ str      ┆ ---          ┆ i64 ┆ ---         ┆ ---         ┆ ---         │\n│          ┆          ┆ str          ┆     ┆ i64         ┆ i64         ┆ i64         │\n╞══════════╪══════════╪══════════════╪═════╪═════════════╪═════════════╪═════════════╡\n│ \"apple\"  ┆ \"beetle\" ┆ \"fruits\"     ┆ 11  ┆ 4           ┆ 7           ┆ 4           │\n├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n│ \"apple\"  ┆ \"beetle\" ┆ \"fruits\"     ┆ 11  ┆ 4           ┆ 7           ┆ 3           │\n├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n│ \"banana\" ┆ \"beetle\" ┆ \"fruits\"     ┆ 11  ┆ 4           ┆ 8           ┆ 5           │\n├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n│ \"banana\" ┆ \"audi\"   ┆ \"fruits\"     ┆ 11  ┆ 2           ┆ 8           ┆ 2           │\n├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌┤\n│ \"banana\" ┆ \"beetle\" ┆ \"fruits\"     ┆ 11  ┆ 4           ┆ 8           ┆ 1           │\n└──────────┴──────────┴──────────────┴─────┴─────────────┴─────────────┴─────────────┘\n```\n\n```js\n\u003e df[\"cars\"] // or df.getColumn(\"cars\")\nshape: (5,)\nSeries: 'cars' [str]\n[\n        \"beetle\"\n        \"beetle\"\n        \"beetle\"\n        \"audi\"\n        \"beetle\"\n]\n```\n\n## Node setup\n\nInstall the latest polars version with:\n\n```sh\n$ yarn add nodejs-polars # yarn\n$ npm i -s nodejs-polars # npm\n$ bun i -D nodejs-polars # Bun\n```\n\nReleases happen quite often (weekly / every few days) at the moment, so updating polars regularly to get the latest bugfixes / features might not be a bad idea.\n\n### Minimum Requirements\n- Node version `\u003e=18`\n- Rust version `\u003e=1.86` - *Only needed for development*\n\n\n## Deno\n\nIn Deno modules you can import polars straight from `npm`:\n\n```typescript\nimport pl from \"npm:nodejs-polars\";\n```\n\nWith Deno 1.37, you can use the `display` function to display a `DataFrame` in the notebook:\n\n```typescript\nimport pl from \"npm:nodejs-polars\";\nimport { display } from \"https://deno.land/x/display@v1.1.2/mod.ts\";\n\nlet response = await fetch(\n  \"https://cdn.jsdelivr.net/npm/world-atlas@1/world/110m.tsv\",\n);\nlet data = await response.text();\nlet df = pl.readCSV(data, { sep: \"\\t\" });\nawait display(df)\n```\n\nWith Deno 1.38, you only have to make the dataframe be the last expression in the cell:\n\n```typescript\nimport pl from \"npm:nodejs-polars\";\nlet response = await fetch(\n  \"https://cdn.jsdelivr.net/npm/world-atlas@1/world/110m.tsv\",\n);\nlet data = await response.text();\nlet df = pl.readCSV(data, { sep: \"\\t\" });\ndf\n```\n\n\u003cimg width=\"510\" alt=\"image\" src=\"https://github.com/pola-rs/nodejs-polars/assets/836375/90cf7bf4-7478-4919-b297-f8eb6a16196f\"\u003e\n\n\n___\n\n## Documentation\n\nWant to know about all the features Polars supports? Read the [docs](https://docs.pola.rs)!\n\n#### Python\n\n- Installation guide: `$ pip3 install polars`\n- [Python documentation](https://pola-rs.github.io/polars/py-polars/html/reference/index.html)\n- [User guide](https://docs.pola.rs)\n\n#### Rust\n\n- [Rust documentation](https://docs.rs/polars/latest/polars/)\n\n#### Node\n\n  * Installation guide: `$ yarn add nodejs-polars` or `$ bun install nodejs-polars`\n  * [Node documentation](https://pola-rs.github.io/nodejs-polars/)\n\n## Contribution\n\nWant to contribute? Read our [contribution guideline](https://github.com/pola-rs/polars/blob/master/CONTRIBUTING.md).\n\n## \\[Node\\]: compile polars from source\n\nIf you want a bleeding edge release or maximal performance you should compile **polars** from source.\n\n1. Install the latest [Rust compiler](https://www.rust-lang.org/tools/install)\n2. Run `npm|yarn install`\n3. Choose any of:\n   - Fastest binary, very long compile times:\n     ```bash\n     $ cd nodejs-polars \u0026\u0026 yarn build \u0026\u0026 yarn build:ts # this will generate a /bin directory with the compiles TS code, as well as the rust binary\n     ```\n   - Debugging, fastest compile times but slow \u0026 large binary:\n     ```bash\n     $ cd nodejs-polars \u0026\u0026 yarn build:debug \u0026\u0026 yarn build:ts # this will generate a /bin directory with the compiles TS code, as well as the rust binary\n     ```\n\n## Webpack configuration\nTo use `nodejs-polars` with [Webpack](https://webpack.js.org) please use [node-loader](https://github.com/webpack-contrib/node-loader) and `webpack.config.js`\n\n## Sponsors\n\n[\u003cimg src=\"https://www.jetbrains.com/company/brand/img/jetbrains_logo.png\" height=\"50\" alt=\"JetBrains logo\" /\u003e](https://www.jetbrains.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpola-rs%2Fnodejs-polars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpola-rs%2Fnodejs-polars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpola-rs%2Fnodejs-polars/lists"}