{"id":20955355,"url":"https://github.com/dataship/frame","last_synced_at":"2025-07-08T01:40:40.811Z","repository":{"id":57211513,"uuid":"74055719","full_name":"dataship/frame","owner":"dataship","description":"A DataFrame for Javascript","archived":false,"fork":false,"pushed_at":"2017-11-08T16:12:46.000Z","size":140,"stargazers_count":18,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T17:24:47.598Z","etag":null,"topics":["data-frame","data-science","javascript","statistics"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dataship.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}},"created_at":"2016-11-17T18:31:41.000Z","updated_at":"2024-02-08T10:11:56.000Z","dependencies_parsed_at":"2022-08-30T12:30:19.946Z","dependency_job_id":null,"html_url":"https://github.com/dataship/frame","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataship%2Fframe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataship%2Fframe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataship%2Fframe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dataship%2Fframe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dataship","download_url":"https://codeload.github.com/dataship/frame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254071384,"owners_count":22009782,"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":["data-frame","data-science","javascript","statistics"],"created_at":"2024-11-19T01:19:01.011Z","updated_at":"2025-05-14T04:33:08.092Z","avatar_url":"https://github.com/dataship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# frame\n\na DataFrame for Javascript.\n\n_crunch numbers in Node or the Browser_\n\n## features\n* Interactive performance (\u003c100ms) on millions of rows\n* Syntax similar to SQL and Pandas\n* Compatible with `PapaParse` and [`BabyParse`](https://github.com/Rich-Harris/BabyParse)\n\n## examples\nParse the [Iris](https://vincentarelbundock.github.io/Rdatasets/datasets.html)\ndataset (with [`BabyParse`](https://github.com/Rich-Harris/BabyParse)) and create a `Frame` from the result.\n\n```javascript\nvar baby = require('babyparse'),\n    Frame = require('frame');\n\n// parse the csv file\nconfig = {\"header\" :true, \"dynamicTyping\" : true, \"skipEmptyLines\" : true};\niris = baby.parseFiles('iris.csv', config).data;\n\n// create a frame from the parsed results\nframe = new Frame(iris);\n```\n### groupby\n\nGroup on `Species` and find the average value (`mean`) for `Sepal.Length`.\n```javascript\ng = frame.groupby(\"Species\");\ng.mean(\"Sepal.Length\");\n```\n```json\n{ \"virginica\": 6.58799, \"versicolor\": 5.9360, \"setosa\": 5.006 }\n```\nUsing the same grouping, find the average value for `Sepal.Width`.\n```javascript\ng.mean(\"Sepal.Width\");\n```\n```json\n{ \"virginica\": 2.97399, \"versicolor\": 2.770, \"setosa\": 3.4279 }\n```\n\n### where\nFilter by `Species` value `virginica` then find the average.\n```javascript\nf = frame.where(\"Species\", \"virginica\");\nf.mean(\"Sepal.Length\");\n```\n```json\n6.58799\n```\nGet the number of rows that match the filter.\n```javascript\nf.count();\n```\n```json\n50\n```\nColumns can also be accessed directly (with the filter applied).\n```javascript\nf[\"Species\"]\n```\n```javascript\n[\"virginica\", \"virginica\", \"virginica\", ..., \"virginica\"]\n```\n# tests\nHundreds of tests verify correctness on millions of data points (against a Pandas reference).\n\n`npm run data \u0026\u0026 npm run test`\n\n# benchmarks\n`npm run bench`\n\ntypical performance on one million rows\n\noperation | time\n----------|------\n`groupby` | 54ms\n`where`   | 29ms\n`sum`     | 5ms\n\n# design goals and inspiration\n\n * compatibility with [feather](https://github.com/wesm/feather)\n\n## interface\n\n* pandas\n* R\n* Linq\n* rethinkDB\n* Matlab\n\n## performance\n\n* [datavore](https://github.com/StanfordHCI/datavore)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataship%2Fframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataship%2Fframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataship%2Fframe/lists"}