{"id":13425994,"url":"https://github.com/TomFevrier/kiwis","last_synced_at":"2025-03-15T20:31:46.356Z","repository":{"id":122267911,"uuid":"275401790","full_name":"TomFevrier/kiwis","owner":"TomFevrier","description":"A Pandas-inspired data wrangling toolkit in JavaScript","archived":false,"fork":false,"pushed_at":"2020-08-04T18:47:56.000Z","size":559,"stargazers_count":38,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-05T11:27:31.177Z","etag":null,"topics":["data","data-manipulation","data-wrangling","pandas"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomFevrier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-06-27T15:37:44.000Z","updated_at":"2023-06-19T14:43:20.000Z","dependencies_parsed_at":"2024-02-03T08:49:33.944Z","dependency_job_id":null,"html_url":"https://github.com/TomFevrier/kiwis","commit_stats":{"total_commits":33,"total_committers":6,"mean_commits":5.5,"dds":0.2727272727272727,"last_synced_commit":"7223778243a1933bd677ce6e02f5ab8d0e7e30a0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomFevrier%2Fkiwis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomFevrier%2Fkiwis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomFevrier%2Fkiwis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomFevrier%2Fkiwis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomFevrier","download_url":"https://codeload.github.com/TomFevrier/kiwis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790939,"owners_count":20348378,"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","data-manipulation","data-wrangling","pandas"],"created_at":"2024-07-31T00:01:23.779Z","updated_at":"2025-03-15T20:31:41.332Z","avatar_url":"https://github.com/TomFevrier.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Kiwis 🥝\n\n## A Pandas-inspired data wrangling toolkit in JavaScript\u003c/h2\u003e\n\n### Installation\n\n`npm install kiwis`\n\n\u003c!-- ![](assets/logo-kiwis-small.png) --\u003e\n\n### Getting started\n\n```js\nconst kw = require('kiwis');\n\nconst h2g2Characters = kw.DataFrame([\n  {\n    name: 'Marvin',\n    surname: '',\n    occupation: 'Paranoid Android'\n  },\n  {\n    name: 'Zaphod',\n    surname: 'Beeblebrox',\n    occupation: 'President of the Galaxy'\n  },\n  {\n    name: 'Arthur',\n    surname: 'Dent',\n    occupation: null\n  }\n]);\n\nh2g2Characters.show();\n\n/*\n  |   name |    surname |              occupation\n=================================================\n0 | Marvin |        N/A |        Paranoid Android\n1 | Zaphod | Beeblebrox | President of the Galaxy\n2 | Arthur |       Dent |                     N/A\n\n[3 rows × 3 columns]\nColumns: name, surname, occupation\n*/\n\nconsole.log(h2g2Characters.get(1));\n\n/*\n{\n  name: 'Zaphod',\n  surname: 'Beeblebrox',\n  occupation: 'President of the Galaxy'\n}\n*/\n\nh2g2Characters.name.show();\n\n/*\n0 | Marvin\n1 | Zaphod\n2 | Arthur\n\nLength: 3\n*/\n```\n\n## Documentation\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [Kiwis](#kiwis)\n    -   [DataFrame](#dataframe)\n        -   [Parameters](#parameters)\n        -   [Examples](#examples)\n    -   [Series](#series)\n        -   [Parameters](#parameters-1)\n        -   [Examples](#examples-1)\n    -   [loadCSV](#loadcsv)\n        -   [Parameters](#parameters-2)\n        -   [Examples](#examples-2)\n    -   [parseCSV](#parsecsv)\n        -   [Parameters](#parameters-3)\n        -   [Examples](#examples-3)\n    -   [isNA](#isna)\n        -   [Parameters](#parameters-4)\n        -   [Examples](#examples-4)\n-   [DataFrame](#dataframe-1)\n    -   [Properties](#properties)\n    -   [toArray](#toarray)\n    -   [clone](#clone)\n    -   [get](#get)\n        -   [Parameters](#parameters-5)\n        -   [Examples](#examples-5)\n    -   [first](#first)\n    -   [last](#last)\n    -   [find](#find)\n        -   [Parameters](#parameters-6)\n        -   [Examples](#examples-6)\n    -   [set](#set)\n        -   [Parameters](#parameters-7)\n        -   [Examples](#examples-7)\n    -   [head](#head)\n        -   [Parameters](#parameters-8)\n        -   [Examples](#examples-8)\n    -   [tail](#tail)\n        -   [Parameters](#parameters-9)\n        -   [Examples](#examples-9)\n    -   [slice](#slice)\n        -   [Parameters](#parameters-10)\n        -   [Examples](#examples-10)\n    -   [rows](#rows)\n        -   [Examples](#examples-11)\n    -   [items](#items)\n        -   [Examples](#examples-12)\n    -   [forEach](#foreach)\n        -   [Parameters](#parameters-11)\n        -   [Examples](#examples-13)\n    -   [map](#map)\n        -   [Parameters](#parameters-12)\n        -   [Examples](#examples-14)\n    -   [replace](#replace)\n        -   [Parameters](#parameters-13)\n        -   [Examples](#examples-15)\n    -   [append](#append)\n        -   [Parameters](#parameters-14)\n        -   [Examples](#examples-16)\n    -   [insert](#insert)\n        -   [Parameters](#parameters-15)\n        -   [Examples](#examples-17)\n    -   [concat](#concat)\n        -   [Parameters](#parameters-16)\n        -   [Examples](#examples-18)\n    -   [join](#join)\n        -   [Parameters](#parameters-17)\n        -   [Examples](#examples-19)\n    -   [addColumn](#addcolumn)\n        -   [Parameters](#parameters-18)\n        -   [Examples](#examples-20)\n    -   [rename](#rename)\n        -   [Parameters](#parameters-19)\n        -   [Examples](#examples-21)\n    -   [reorder](#reorder)\n        -   [Parameters](#parameters-20)\n        -   [Examples](#examples-22)\n    -   [dropNA](#dropna)\n        -   [Parameters](#parameters-21)\n        -   [Examples](#examples-23)\n    -   [dropDuplicates](#dropduplicates)\n        -   [Parameters](#parameters-22)\n        -   [Examples](#examples-24)\n    -   [filter](#filter)\n        -   [Parameters](#parameters-23)\n        -   [Examples](#examples-25)\n    -   [drop](#drop)\n        -   [Parameters](#parameters-24)\n        -   [Examples](#examples-26)\n    -   [sort](#sort)\n        -   [Parameters](#parameters-25)\n        -   [Examples](#examples-27)\n    -   [shuffle](#shuffle)\n        -   [Parameters](#parameters-26)\n        -   [Examples](#examples-28)\n    -   [pivot](#pivot)\n        -   [Parameters](#parameters-27)\n        -   [Examples](#examples-29)\n    -   [toString](#tostring)\n    -   [show](#show)\n    -   [toCSV](#tocsv)\n        -   [Parameters](#parameters-28)\n        -   [Examples](#examples-30)\n    -   [toJSON](#tojson)\n        -   [Parameters](#parameters-29)\n        -   [Examples](#examples-31)\n-   [Series](#series-1)\n    -   [Properties](#properties-1)\n    -   [toArray](#toarray-1)\n    -   [clone](#clone-1)\n    -   [get](#get-1)\n        -   [Parameters](#parameters-30)\n        -   [Examples](#examples-32)\n    -   [first](#first-1)\n    -   [last](#last-1)\n    -   [find](#find-1)\n        -   [Parameters](#parameters-31)\n        -   [Examples](#examples-33)\n    -   [set](#set-1)\n        -   [Parameters](#parameters-32)\n        -   [Examples](#examples-34)\n    -   [head](#head-1)\n        -   [Parameters](#parameters-33)\n        -   [Examples](#examples-35)\n    -   [tail](#tail-1)\n        -   [Parameters](#parameters-34)\n        -   [Examples](#examples-36)\n    -   [slice](#slice-1)\n        -   [Parameters](#parameters-35)\n        -   [Examples](#examples-37)\n    -   [values](#values)\n        -   [Examples](#examples-38)\n    -   [items](#items-1)\n        -   [Examples](#examples-39)\n    -   [forEach](#foreach-1)\n        -   [Parameters](#parameters-36)\n        -   [Examples](#examples-40)\n    -   [map](#map-1)\n        -   [Parameters](#parameters-37)\n        -   [Examples](#examples-41)\n    -   [append](#append-1)\n        -   [Parameters](#parameters-38)\n        -   [Examples](#examples-42)\n    -   [insert](#insert-1)\n        -   [Parameters](#parameters-39)\n        -   [Examples](#examples-43)\n    -   [concat](#concat-1)\n        -   [Parameters](#parameters-40)\n        -   [Examples](#examples-44)\n    -   [dropNA](#dropna-1)\n        -   [Parameters](#parameters-41)\n        -   [Examples](#examples-45)\n    -   [dropDuplicates](#dropduplicates-1)\n        -   [Parameters](#parameters-42)\n        -   [Examples](#examples-46)\n    -   [any](#any)\n        -   [Parameters](#parameters-43)\n        -   [Examples](#examples-47)\n    -   [all](#all)\n        -   [Parameters](#parameters-44)\n        -   [Examples](#examples-48)\n    -   [filter](#filter-1)\n        -   [Parameters](#parameters-45)\n        -   [Examples](#examples-49)\n    -   [drop](#drop-1)\n        -   [Parameters](#parameters-46)\n        -   [Examples](#examples-50)\n    -   [sort](#sort-1)\n        -   [Parameters](#parameters-47)\n        -   [Examples](#examples-51)\n    -   [shuffle](#shuffle-1)\n        -   [Parameters](#parameters-48)\n        -   [Examples](#examples-52)\n    -   [unique](#unique)\n    -   [counts](#counts)\n        -   [Parameters](#parameters-49)\n        -   [Examples](#examples-53)\n    -   [frequencies](#frequencies)\n        -   [Parameters](#parameters-50)\n        -   [Examples](#examples-54)\n    -   [round](#round)\n        -   [Parameters](#parameters-51)\n        -   [Examples](#examples-55)\n    -   [reduce](#reduce)\n        -   [Parameters](#parameters-52)\n        -   [Examples](#examples-56)\n    -   [sum](#sum)\n    -   [min](#min)\n    -   [max](#max)\n    -   [extent](#extent)\n    -   [mean](#mean)\n    -   [median](#median)\n    -   [std](#std)\n    -   [toString](#tostring-1)\n    -   [show](#show-1)\n    -   [toCSV](#tocsv-1)\n        -   [Parameters](#parameters-53)\n        -   [Examples](#examples-57)\n    -   [toJSON](#tojson-1)\n        -   [Parameters](#parameters-54)\n        -   [Examples](#examples-58)\n-   [PivotTable](#pivottable)\n    -   [Properties](#properties-2)\n    -   [rollup](#rollup)\n        -   [Parameters](#parameters-55)\n        -   [Examples](#examples-59)\n    -   [count](#count)\n        -   [Examples](#examples-60)\n    -   [sum](#sum-1)\n        -   [Parameters](#parameters-56)\n        -   [Examples](#examples-61)\n    -   [min](#min-1)\n        -   [Parameters](#parameters-57)\n        -   [Examples](#examples-62)\n    -   [max](#max-1)\n        -   [Parameters](#parameters-58)\n        -   [Examples](#examples-63)\n    -   [mean](#mean-1)\n        -   [Parameters](#parameters-59)\n        -   [Examples](#examples-64)\n    -   [median](#median-1)\n        -   [Parameters](#parameters-60)\n        -   [Examples](#examples-65)\n    -   [std](#std-1)\n        -   [Parameters](#parameters-61)\n        -   [Examples](#examples-66)\n    -   [toString](#tostring-2)\n    -   [show](#show-2)\n    -   [toJSON](#tojson-2)\n        -   [Parameters](#parameters-62)\n        -   [Examples](#examples-67)\n\n### Kiwis\n\n#### DataFrame\n\nReturns a new DataFrame from the given data\n\n##### Parameters\n\n-   `data` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** An array of objects\n\n##### Examples\n\n```javascript\nconst kw = require('kiwis');\n\nconst df = kw.DataFrame([\n  {\n    name: 'Marvin',\n    surname: '',\n    occupation: 'Paranoid Android'\n  },\n  {\n    name: 'Zaphod',\n    surname: 'Beeblebrox',\n    occupation: 'President of the Galaxy'\n  },\n  {\n    name: 'Arthur',\n    surname: 'Dent',\n    occupation: null\n  }\n]);\n\nconsole.log(df.length) // 3\nconsole.log(df.columns) // ['name', 'surname', 'occupation']\nconsole.log(df.empty) // false\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### Series\n\nReturns a new Series from the given data\n\n##### Parameters\n\n-   `data` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e** An array of values\n\n##### Examples\n\n```javascript\nconst kw = require('kiwis');\n\nconst series = kw.Series([1, 1, 2, 3, 5, 8, 13, 21, 34]);\n\nconsole.log(series.length) // 9\nconsole.log(series.empty) // false\n```\n\nReturns **[Series](#series)** \n\n#### loadCSV\n\nLoads a CSV file into a DataFrame\n\n##### Parameters\n\n-   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of the file to load\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Options (optional, default `{}`)\n    -   `options.delimiter` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Delimiter of the file (optional, default `','`)\n    -   `options.encoding` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Encoding of the file (optional, default `'utf8'`)\n    -   `options.prettify` **(`\"none\"` \\| `\"camelCase\"` \\| `\"snake_case\"`)** Prettify column names (optional, default `'none'`)\n\n##### Examples\n\n```javascript\nconst kw = require('kiwis');\n\n// Loads a CSV file\nconst df = kw.loadCSV('myAwesomeData.csv');\n\n// Loads a TSV file and prettify the columns in camelCase\nconst df = kw.loadCSV('myAwesomeData.tsv', { delimiter: '\\t', prettify; 'camelCase' });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### parseCSV\n\nParses a CSV string into a DataFrame\n\n##### Parameters\n\n-   `csv` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** CSV string to parse\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Options (optional, default `{}`)\n    -   `options.delimiter` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Delimiter of the file (optional, default `','`)\n    -   `options.prettify` **(`\"none\"` \\| `\"camelCase\"` \\| `\"snake_case\"`)** Prettify column names (optional, default `'none'`)\n\n##### Examples\n\n```javascript\nconst kw = require('kiwis');\n\n// Parses a CSV string\nconst df = kw.parseCSV(`\n  name,surname,occupation\\n\n  Marvin,,Paranoid Android\\n\n  Zaphod,Beeblebrox,President of the Galaxy\\n\n  Arthur,Dent,\\n\n`);\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### isNA\n\nDetermines whether a value is N/A or not\n\n##### Parameters\n\n-   `value` **any** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Options (optional, default `{}`)\n    -   `options.keep` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e** Array of falsy values not considered N/A (optional, default `[0,false]`)\n\n##### Examples\n\n```javascript\nKiwis.isNA('kiwi'); // false\nKiwis.isNA(''); // true\nKiwis.isNA('', { keep: [0, false, ''] }); // false\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n### DataFrame\n\n#### Properties\n\n-   `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The number of rows in the DataFrame\n-   `empty` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether the DataFrame contains any row or not\n-   `columns` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** The columns of the DataFrame\n\n#### toArray\n\nReturns the DataFrame as an array\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** \n\n#### clone\n\nClones the DataFrame\n\nReturns **[DataFrame](#dataframe)** \n\n#### get\n\nReturns any row of the DataFrame\n\n##### Parameters\n\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n##### Examples\n\n```javascript\n// Returns the row at index 4\ndf.get(4);\n```\n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n#### first\n\nReturns the first row of the DataFrame\n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n#### last\n\nReturns the last row of the DataFrame\n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n#### find\n\nReturns a specific row in the DataFrame\n\n##### Parameters\n\n-   `condition` **callback** The returned row is the first one that matches this condition\n\n##### Examples\n\n```javascript\n// Returns the row where the 'name' is 'Marvin'\ndf.find(row =\u003e row.name === 'Marvin');\n```\n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** \n\n#### set\n\nSets the content of a cell in the DataFrame\n\n##### Parameters\n\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n-   `column` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n-   `value` **any** \n\n##### Examples\n\n```javascript\n// Sets the value for 'name' on the 42nd row to 'Slartibartfast'\ndf.set(42, 'name', 'Slartibartfast');\n```\n\n#### head\n\nReturns a new DataFrame containing the first N rows of the DataFrame\n\n##### Parameters\n\n-   `n` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of rows to select (optional, default `5`)\n\n##### Examples\n\n```javascript\n// Returns a new DataFrame with the first 10 rows\ndf.head(10);\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### tail\n\nReturns a new DataFrame containing the last N rows of the DataFrame\n\n##### Parameters\n\n-   `n` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of rows to select (optional, default `5`)\n\n##### Examples\n\n```javascript\n// Returns a new DataFrame with the last 5 rows\ndf.tail();\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### slice\n\nReturns a new DataFrame with a slice of the original rows\n\n##### Parameters\n\n-   `start` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Zero-based index at which to start extraction\n-   `end` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Zero-based index before which to end extraction (optional, default `DataFrame.length`)\n\n##### Examples\n\n```javascript\n// Returns a new DataFrame with rows starting at index 10\ndf.slice(10);\n// Returns a new DataFrame with rows between index 24 (included) and 42 (excluded)\ndf.slice(24, 42);\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### rows\n\nReturns the rows of the DataFrame as an iterable\n\n##### Examples\n\n```javascript\nfor (let row of df.rows()) {\n  console.log(row);\n}\n```\n\nReturns **Iterable\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** \n\n#### items\n\nReturns an array of index/row pairs as an iterable\n\n##### Examples\n\n```javascript\nfor (let [index, row] of df.items()) {\n  console.log(index, row);\n}\n```\n\nReturns **Iterable\u0026lt;[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e\u003e** \n\n#### forEach\n\nApplies a callback function to each row of the DataFrame\n\n##### Parameters\n\n-   `callback` **callback** \n\n##### Examples\n\n```javascript\n// Displays each element in the 'name' column of the DataFrame\ndf.forEach(row =\u003e console.log(row.name));\n```\n\n#### map\n\nReturns a new Series populated with the results of a callback function applied on each row the DataFrame\n\n##### Parameters\n\n-   `callback` **callback** \n\n##### Examples\n\n```javascript\n// Returns a Series of full names by joining the name and surname for each row of the DataFrame\ndf.map(row =\u003e [row.name, row.surname].join(' '));\n```\n\nReturns **[Series](#series)** \n\n#### replace\n\nReplaces all occurences of the given value in the DataFrame by another value\n\n##### Parameters\n\n-   `oldValue` **any** \n-   `newValue` **any** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n    -   `options.columns` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** Columns to replace into (optional, default `DataFrame.columns`)\n\n##### Examples\n\n```javascript\n// Replaces all occurrences of 'panda' with 'kiwi' in the column 'animal'\ndf.replace('panda', 'kiwi', { inPlace: true, columns: 'animal' });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### append\n\nAppends new rows to a DataFrame\n\n##### Parameters\n\n-   `rows` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e)** Row or array of rows to append to the DataFrame\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.extend` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Adds new columns to the DataFrame if they do not already exist (optional, default `false`)\n\n##### Examples\n\n```javascript\nconst rows = [\n  {\n    name: 'Marvin',\n    occupation: 'Robot'\n  },\n  {\n    name: 'Zaphod Beeblebrox',\n    occupation: 'President of the Galaxy'\n  }\n];\ndf.append(rows, { extend: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### insert\n\nInserts new rows into a DataFrame\n\n##### Parameters\n\n-   `rows` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e)** Row or array of rows to insert into the DataFrame\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index to insert the rows at (optional, default `0`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.extend` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Adds new columns to the DataFrame if they do not already exist (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Inserts a new row at index 2 in the DataFrame\ndf.insert({ name: 'Trillian', species: 'human' }, 2, { extend: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### concat\n\nConcatenates another DataFrame to the DataFrame\n\n##### Parameters\n\n-   `other` **[DataFrame](#dataframe)** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.extend` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Adds new columns to the DataFrame if they do not already exist (optional, default `false`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Concatenates df1 and df2, adding columns from df2 into df1 if they do not exist\ndf1.concat(df2, { inPlace: true, extend: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### join\n\nPerforms a join of two DataFrames on a given column\n\n##### Parameters\n\n-   `other` **[DataFrame](#dataframe)** \n-   `column` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Column to join the DataFrames on\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.how` **(`\"inner\"` \\| `\"outer\"` \\| `\"left\"` \\| `\"right\"`)** How the DataFrames should be joined: `'inner'` only keeps the intersection of the rows, `'outer'` keeps the union of the rows, `'left'` only keeps rows from the current DataFrame, and `'right'` only keeps rows from the `other` DataFrame (optional, default `'inner'`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Joins DataFrames df1 and df2 along their column 'id', keeping only the rows from df1\ndf1.join(df2, 'id', { inPlace: true, how: 'left' });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### addColumn\n\nAdds a new column to the DataFrame\n\n##### Parameters\n\n-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of the new column\n-   `column` **(any | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e | [Series](#series))** Content of the new column as an array, a Series or any value (to be set on every rows)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.extend` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** If the new column is not the same length as the DataFrame, extends the DataFrame (optional, default `false`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Adds a new column 'fullName' by applying a function on the DataFrame\ndf.addColumn(\n  'fullName',\n  df.map(row =\u003e [row.name, row.surname].join(' ')),\n  { inPlace: true }\n);\n\n// Adds a new column 'species', with 'human' on every rows\ndf.addColumn('species', 'human', { inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### rename\n\nRename columns of the DataFrame\n\n##### Parameters\n\n-   `map` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u0026lt;key, [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** Map of the columns to rename to their new names\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Renames column 'occupation' into 'job'\ndf.rename({ occupation: 'job' }, { inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### reorder\n\nReorder the columns of the DataFrame\n\n##### Parameters\n\n-   `names` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** Array containing the new order of the columns\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\nconsole.log(df.columns) // ['occupation', 'species', 'name']\ndf.reorder(['name', 'occupation', 'species'], { inPlace: true });\nconsole.log(df.columns) // ['name', 'occupation', 'species']\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### dropNA\n\nDrops N/A values from the DataFrame\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.axis` **(`\"rows\"` \\| `\"columns\"`)** Determines whether rows or columns should be dropped (optional, default `'rows'`)\n    -   `options.keep` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e** Array of falsy values to keep in the DataFrame (optional, default `[0,false]`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Drops all rows containg N/A values\ndf.dropNA({ inPlace: true });\n// Drops all columns containing N/A values (but keeps empty strings as well as 0 and false)\ndf.dropNA({ axis: 'columns', keep: [0, false, ''], inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### dropDuplicates\n\nDrops duplicate rows from the DataFrame\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.columns` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** Column or array of columns to consider for comparison (optional, default `DataFrame.columns`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Drops duplicate rows with similar values for 'name'\ndf.dropDuplicates({ columns: 'name', inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### filter\n\nFilters columns or rows of the DataFrame\n\n##### Parameters\n\n-   `filter` **(callback | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** Can be a callback (applied to rows or columns) or an array of column names to keep\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.axis` **(`\"rows\"` \\| `\"columns\"`)** Determines whether the callback should apply to rows or columns (optional, default `'rows'`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Only keeps the 'date' and 'url' columns\ndf.filter(['date', 'url'], { inPlace: true });\n// Only keeps rows whose date is 4/20/20\ndf.filter(row =\u003e row.date === '2020-04-20', { inPlace: true });\n// Only keeps columns whose name contains 'data'\ndf.filter(column =\u003e column.includes('data'), { axis: 'columns', inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### drop\n\nDrops columns or rows from the DataFrame\n\n##### Parameters\n\n-   `filter` **(callback | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** Can be a callback (applied to rows or columns) or an array of column names to drop\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.axis` **(`\"rows\"` \\| `\"columns\"`)** Determines whether the callback should apply to rows or columns (optional, default `'rows'`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Removes the 'date' and 'url' columns\ndf.drop(['date', 'url'], { inPlace: true });\n// Removes all rows whose date is 4/20/20\ndf.drop(row =\u003e row.date === '2020-04-20', { inPlace: true });\n// Removes columns whose name contains 'data'\ndf.drop(column =\u003e column.includes('data'), { axis: 'columns', inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### sort\n\nSorts the DataFrame\n\n##### Parameters\n\n-   `by` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** Key or array of keys to sort the DataFrame by\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.reverse` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Sorts the DataFrame in descending order (optional, default `false`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Sorts the DataFrame alphabetically by 'name'\ndf.sort('name', { inPlace: true });\n// Sorts the DataFrame in descending ordr by 'age'\ndf.sort('age', { reverse: true, inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### shuffle\n\nShuffles the rows or columns of a DataFrame\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.axis` **(`\"rows\"` \\| `\"columns\"`)** Determines whether rows or columns should be shuffled (optional, default `'rows'`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current DataFrame instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Shuffles the columns of the DataFrame\ndf.shuffle({ axis: 'columns', inPlace: true });\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### pivot\n\nReturns a PivotTable along the given columns\n\n##### Parameters\n\n-   `columns` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** Column or array of columns to pivot along\n\n##### Examples\n\n```javascript\n// Returns a PivotTable along columns 'sector' and 'date'\ndf.pivot(['sector', 'date']);\n```\n\nReturns **[PivotTable](#pivottable)** \n\n#### toString\n\nFormats the DataFrame for display\n\nReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n#### show\n\nDisplays the DataFrame\n\n#### toCSV\n\nExports the DataFrame as CSV\n\n##### Parameters\n\n-   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of the file to save (optional, default `null`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.delimiter` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Delimiter to use (optional, default `','`)\n\n##### Examples\n\n```javascript\ndf.toCSV('myAwesomeData.csv'); // to CSV\ndf.toCSV('myAwesomeData.tsv', { delimiter: '\\t' }); // to TSV\n```\n\nReturns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** A CSV string if `path` is not set\n\n#### toJSON\n\nExports the DataFrame as JSON\n\n##### Parameters\n\n-   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of the file to save (optional, default `null`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.prettify` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Prettify JSON output (optional, default `true`)\n\n##### Examples\n\n```javascript\ndf.toJSON('myAwesomeData.json');\n```\n\nReturns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** A JSON string if `path` is not set\n\n### Series\n\n#### Properties\n\n-   `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The number of values in the Series\n-   `empty` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether the Series contains any value or not\n\n#### toArray\n\nReturns the Series as an array\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e** \n\n#### clone\n\nClones the Series\n\nReturns **[Series](#series)** \n\n#### get\n\nReturns any row of the Series\n\n##### Parameters\n\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n##### Examples\n\n```javascript\n// Returns the value at index 4\nseries.get(4);\n```\n\nReturns **any** \n\n#### first\n\nReturns the first value of the Series\n\nReturns **any** \n\n#### last\n\nReturns the last value of the Series\n\nReturns **any** \n\n#### find\n\nReturns a specific value in the Series\n\n##### Parameters\n\n-   `condition` **callback** The returned value is the first one that matches this condition\n\n##### Examples\n\n```javascript\n// Returns the value that contains 'fast'\nseries.find(value =\u003e value.includes('fast'));\n```\n\nReturns **any** \n\n#### set\n\nSets a value in the Series\n\n##### Parameters\n\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n-   `value` **any** \n\n##### Examples\n\n```javascript\n// Sets the 42nd value of the Series to 'Slartibartfast'\ndf.set(42, 'Slartibartfast');\n```\n\n#### head\n\nReturns a new Series containing the first N values of the Series\n\n##### Parameters\n\n-   `n` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of values to select (optional, default `5`)\n\n##### Examples\n\n```javascript\n// Returns a new Series with the first 10 values\nseries.head(10);\n```\n\nReturns **[Series](#series)** \n\n#### tail\n\nReturns a new Series containing the last N values of the Series\n\n##### Parameters\n\n-   `n` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of values to select (optional, default `5`)\n\n##### Examples\n\n```javascript\n// Returns a new Series with the last 5 values\nseries.tail();\n```\n\nReturns **[Series](#series)** \n\n#### slice\n\nReturns a new Series with a slice of the original values\n\n##### Parameters\n\n-   `start` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Zero-based index at which to start extraction\n-   `end` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Zero-based index before which to end extraction (optional, default `Series.length`)\n\n##### Examples\n\n```javascript\n// Returns a new Series with values starting at index 10\nseries.slice(10);\n// Returns a new Series with values between index 24 (included) and 42 (excluded)\nseries.slice(24, 42);\n```\n\nReturns **[Series](#series)** \n\n#### values\n\nReturns the values of the Series as an iterable\n\n##### Examples\n\n```javascript\nfor (let value of series.values()) {\n  console.log(value);\n}\n```\n\nReturns **Iterable\u0026lt;any\u003e** \n\n#### items\n\nReturns an array of index/value pairs as an iterable\n\n##### Examples\n\n```javascript\nfor (let [index, value] of series.items()) {\n  console.log(index, value);\n}\n```\n\nReturns **Iterable\u0026lt;[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), any\u003e\u003e** \n\n#### forEach\n\nApplies a callback function to each value of the Series\n\n##### Parameters\n\n-   `callback` **callback** \n\n##### Examples\n\n```javascript\n// Displays each value of the Series\nseries.forEach(value =\u003e console.log(value));\n```\n\n#### map\n\nReturns a new Series populated with the results of a callback function applied on the Series\n\n##### Parameters\n\n-   `callback` **callback** \n\n##### Examples\n\n```javascript\n// Double each value in the Series\nseries.map(value =\u003e value * 2);\n```\n\nReturns **[Series](#series)** \n\n#### append\n\nAppends new values to a Series\n\n##### Parameters\n\n-   `values` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e)** Value or array of values to append to the Series\n\n##### Examples\n\n```javascript\nseries.append([42, 101]);\n```\n\nReturns **[Series](#series)** \n\n#### insert\n\nInserts new values into a Series\n\n##### Parameters\n\n-   `values` **(any | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e)** Value or array of values to insert into the Series\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index to insert the values at (optional, default `0`)\n\n##### Examples\n\n```javascript\n// Inserts value 42 at index 2 in the Series\nseries.insert(42, 2);\n```\n\nReturns **[Series](#series)** \n\n#### concat\n\nConcats another Series to the Series\n\n##### Parameters\n\n-   `other` **[Series](#series)** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Concatenates series1 and series2\nseries1.concat(series2, { inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### dropNA\n\nDrops N/A values from the Series\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.keep` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e** Array of falsy values to keep in the Series (optional, default `[0,false]`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Drop all N/A values from the Series\nseries.dropNA({ inPlace: true });\n// Drop all N/A values but keep empty strings\nseries.dropNA({ keep: [''], inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### dropDuplicates\n\nDrops duplicate values from the Series\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\nseries.dropDuplicates({ inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### any\n\nReturns true if any value of the series satisfies the given condition\n\n##### Parameters\n\n-   `condition` **callback**  (optional, default `!Kiwis.isNA`)\n\n##### Examples\n\n```javascript\n// Returns true if any value is not N/A\nseries.any();\n\n// Returns true if any value is greater than 42\nseries.any(value =\u003e value \u003e 42);\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n#### all\n\nReturns true if all values of the series satisfy the given condition\n\n##### Parameters\n\n-   `condition` **callback**  (optional, default `!Kiwis.isNA`)\n\n##### Examples\n\n```javascript\n// Returns true if all values are not N/A\nseries.all();\n\n// Returns true if all values are greater than 42\nseries.all(value =\u003e value \u003e 42);\n```\n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n#### filter\n\nFilters values of the Series\n\n##### Parameters\n\n-   `filter` **callback** Callback to apply\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Only keeps values greater than 42\nseries.filter(value =\u003e value \u003e 42, { inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### drop\n\nDrops values from the Series\n\n##### Parameters\n\n-   `filter` **callback** Callback to apply\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Only drops values greater than 42\nseries.drop(value =\u003e value \u003e 42, { inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### sort\n\nSorts the Series\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.reverse` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Sorts the Series in descending order (optional, default `false`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Sorts the Series in descending order\nseries.sort({ reverse: true, inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### shuffle\n\nShuffles the values of a Series\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\nseries.shuffle({ inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### unique\n\nReturns the unique values in the Series as an array\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;any\u003e** \n\n#### counts\n\nReturns the number of occurrences for each value in the Series\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.sort` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Sorts the counts (optional, default `true`)\n    -   `options.reverse` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Sorts the counts in descending order (optional, default `true`)\n\n##### Examples\n\n```javascript\n// Returns the number of occurrences for each value in the Series, in ascending order\nseries.counts({ reverse: false });\n```\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;\\[any, [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)]\u003e** Counts as an array of of value/count pairs\n\n#### frequencies\n\nReturns the frequency for each value in the Series\n\n##### Parameters\n\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.sort` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Sorts the frequencies (optional, default `true`)\n    -   `options.reverse` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Sorts the frequencies in descending order (optional, default `true`)\n\n##### Examples\n\n```javascript\n// Returns the frequency for each value in the Series, in ascending order\nseries.frequencies({ reverse: false });\n```\n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;\\[any, [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)]\u003e** Counts as an array of value/frequency pairs\n\n#### round\n\nRound the values in the Series\n\n##### Parameters\n\n-   `digits` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Number of digits for rounding (optional, default `0`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.inPlace` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Changes the current Series instead of returning a new one (optional, default `false`)\n\n##### Examples\n\n```javascript\n// Rounds all values in the digits to 2 decimal points\nseries.round(2, { inPlace: true });\n\n// Truncates all values in the Series\nseries.round(0, { inPlace: true });\n```\n\nReturns **[Series](#series)** \n\n#### reduce\n\nReturns a single reduced value after applying the given callback to the values of the Series\n\n##### Parameters\n\n-   `callback` **callback** \n-   `initial` **any** Value to use as the first argument to the first call of the callback (optional, default `Series.first()`)\n\n##### Examples\n\n```javascript\n// Returns the sum of all values in the Series\nseries.reduce((acc, value) =\u003e acc + value); // Equivalent to series.sum()\n\n// Returns the product of all values in the Series\nseries.reduce((acc, value) =\u003e acc * value, 1);\n```\n\nReturns **any** \n\n#### sum\n\nReturns the sum of the values in the Series\n\nReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n#### min\n\nReturns the minimum value in the Series\n\nReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n#### max\n\nReturns the maximum value in the Series\n\nReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n#### extent\n\nReturns the extent of the Series\n\nReturns **\\[[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number), [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)]** \n\n#### mean\n\nReturns the mean of the values in the Series\n\nReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n#### median\n\nReturns the median of the values in the Series\n\nReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n#### std\n\nReturns the standard deviation of the values in the Series\n\nReturns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\n#### toString\n\nFormats the Series for display\n\nReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n#### show\n\nDisplays the Series\n\n#### toCSV\n\nExports the Series as CSV\n\n##### Parameters\n\n-   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of the file to save (optional, default `null`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Column name to use (optional, default `'series'`)\n\n##### Examples\n\n```javascript\nseries.toCSV('myAwesomeData.csv', { name: 'awesome' });\n```\n\nReturns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** A JSON string if `path` is not set\n\n#### toJSON\n\nExports the Series as a JSON file\n\n##### Parameters\n\n-   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of the file to save (optional, default `null`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Column name to use (optional, default `'series'`)\n    -   `options.prettify` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Prettify JSON output (optional, default `true`)\n\n##### Examples\n\n```javascript\nseries.toJSON('myAwesomeData.json', { name: 'awesome' });\n```\n\nReturns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** A JSON string if `path` is not set\n\n### PivotTable\n\n#### Properties\n\n-   `length` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** The number of rows in the PivotTable\n-   `empty` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether the PivotTable contains any row or not\n-   `columns` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** The columns of the PivotTable, starting with the pivots\n\n#### rollup\n\nApplies the given callback function on the leaves of the PivotTable, returning a DataFrame\n\n##### Parameters\n\n-   `callback` **callback** \n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Name to use for the column in the output DataFrame (optional, default `'data'`)\n\n##### Examples\n\n```javascript\n// For each leaf, computes the number of rows where 'score' is greater than 3\ndf.pivot(['sector', 'date']).rollup(\n  leaf =\u003e leaf.filter(row =\u003e row.score \u003e 3).length,\n  { name: 'nbHighScores' }\n);\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### count\n\nCounts the number of leaves for each branch of the PivotTable\n\n##### Examples\n\n```javascript\ndf.pivot(['sector', 'date']).count();\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### sum\n\nComputes the sum of a given column of the PivotTable\n\n##### Parameters\n\n-   `column`  \n\n##### Examples\n\n```javascript\n// For each leaf, computes the sum of the column 'score'\ndf.pivot(['sector', 'date']).sum('score');\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### min\n\nComputes the minimum value of a given column of the PivotTable\n\n##### Parameters\n\n-   `column`  \n\n##### Examples\n\n```javascript\n// For each leaf, computes the minimum of the column 'score'\ndf.pivot(['sector', 'date']).min('score');\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### max\n\nComputes the maximum value of a given column of the PivotTable\n\n##### Parameters\n\n-   `column`  \n\n##### Examples\n\n```javascript\n// For each leaf, computes the maximum of the column 'score'\ndf.pivot(['sector', 'date']).max('score');\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### mean\n\nComputes the mean of a given column of the PivotTable\n\n##### Parameters\n\n-   `column`  \n\n##### Examples\n\n```javascript\n// For each leaf, computes the mean of the column 'score'\ndf.pivot(['sector', 'date']).mean('score');\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### median\n\nComputes the median of a given column of the PivotTable\n\n##### Parameters\n\n-   `column`  \n\n##### Examples\n\n```javascript\n// For each leaf, computes the median of the column 'score'\ndf.pivot(['sector', 'date']).median('score');\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### std\n\nComputes the standard deviation of a given column of the PivotTable\n\n##### Parameters\n\n-   `column`  \n\n##### Examples\n\n```javascript\n// For each leaf, computes the standard deviation of the column 'score'\ndf.pivot(['sector', 'date']).std('score');\n```\n\nReturns **[DataFrame](#dataframe)** \n\n#### toString\n\nFormats the PivotTable for display\n\nReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n#### show\n\nDisplays the DataFrame\n\n#### toJSON\n\nExports the PivotTable as JSON\n\n##### Parameters\n\n-   `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of the file to save (optional, default `null`)\n-   `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**  (optional, default `{}`)\n    -   `options.prettify` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Prettify JSON output (optional, default `true`)\n\n##### Examples\n\n```javascript\npivotTable.toJSON('myPivotTable.json');\n```\n\nReturns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomFevrier%2Fkiwis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTomFevrier%2Fkiwis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTomFevrier%2Fkiwis/lists"}