diff --git a/404.html b/404.html index 433b0554..7c10199a 100644 --- a/404.html +++ b/404.html @@ -5,7 +5,7 @@ Page Not Found | bpd - + diff --git a/assets/js/5cae8acf.3fd1f232.js b/assets/js/5cae8acf.3fd1f232.js deleted file mode 100644 index b479b660..00000000 --- a/assets/js/5cae8acf.3fd1f232.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[3483],{5001:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var r=s(4848),t=s(8453),c=s(8597);const o={sidebar_position:7},a=void 0,d={id:"grouping",title:"grouping",description:"df.groupby(columnname)ordf.groupby([columnnames])",source:"@site/docs/grouping.md",sourceDirName:".",slug:"/grouping",permalink:"/bpd-reference/docs/grouping",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/docs/grouping.md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"histogram",permalink:"/bpd-reference/docs/plotting/histogram"},next:{title:"Tutorial - Basics",permalink:"/bpd-reference/docs/category/tutorial---basics"}},i={},l=[];function m(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("code",{children:"df.groupby(column_name)"}),"\n",(0,r.jsx)("strong",{children:"or"}),"\n",(0,r.jsx)("code",{children:"df.groupby([column_names])"}),"\n",(0,r.jsxs)("div",{className:"base",children:[(0,r.jsxs)("p",{children:[(0,r.jsxs)("strong",{children:["Group DataFrame by values in columns specified in ",(0,r.jsx)("em",{children:"column_name"})," or a list of ",(0,r.jsx)("em",{children:"column_names"})]}),"."]}),(0,r.jsx)("p",{children:"A groupby operation groups large amounts of data based on the column name(s)"}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Input:"}),(0,r.jsxs)("dd",{className:"parameter",children:["column_name : ",(0,r.jsx)("em",{children:"string"})]}),(0,r.jsx)("dd",{className:"parameter-description",children:"Groups by the column specified. The column becomes the index."}),(0,r.jsxs)("dd",{className:"parameter",children:["column_names : ",(0,r.jsx)("em",{children:"list"})," (of strings)"]}),(0,r.jsx)("dd",{className:"parameter-description",children:"Groups by all listed columns, starting with the first one in the list. The columns become the indices."}),(0,r.jsx)("dt",{className:"term",children:"Note:"}),(0,r.jsxs)("dd",{children:["Grouping without an ",(0,r.jsx)("strong",{children:"aggregate method"})," will return a DataFrameGroupBy object (not DataFrame)"]})]})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Aggregate Methods"})}),"\n",(0,r.jsx)("code",{children:".mean()"})," \xa0 ",(0,r.jsx)("code",{children:".median()"})," \xa0 ",(0,r.jsx)("code",{children:".count()"})," \xa0 ",(0,r.jsx)("code",{children:".max()"})," \xa0 ",(0,r.jsx)("code",{children:".min()"})," \xa0 ",(0,r.jsx)("code",{children:".sum()"})]}),"\n",(0,r.jsx)("div",{className:"base",children:(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Returns:"}),(0,r.jsx)("dd",{children:"df_gb - groupby object that contains information about the groups."}),(0,r.jsx)("dt",{className:"term",children:"Return Type:"}),(0,r.jsx)("dd",{children:"DataFrameGroupBy"})]})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"pets\n"})}),"\n",(0,r.jsx)(c.A,{data:'{"columns":["Species","Color","Weight","Age"],"index":[0,1,2,3,4,5,6],"data":[["dog","black",40.0,5.0],["cat","golden",15.0,8.0],["cat","black",20.0,9.0],["dog","white",80.0,2.0],["dog","black",25.0,0.5],["hamster","black",1.0,3.0],["hamster","golden",0.25,0.2]]}'}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"pets.groupby('Species').count()\n"})}),"\n",(0,r.jsx)(c.A,{data:'{"columns":["ID","Color","Weight","Age"],"index":["cat","dog","hamster"],"data":[[2,2,2,2],[3,3,3,3],[2,2,2,2]]}'})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},8597:(e,n,s)=>{s.d(n,{A:()=>t});s(6540);var r=s(4848);const t=e=>{let{data:n}=e,s=[],t=[],c="",o=[];if(n){const e=JSON.parse(n);s=e.columns||[],t=e.data||[],c=e.indexName||"Index",o=e.index||[]}return(0,r.jsx)("div",{className:"dataframe-container",children:(0,r.jsxs)("table",{className:"dataframe-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:c})," ",s.map(((e,n)=>(0,r.jsx)("th",{children:e},n)))]})}),(0,r.jsx)("tbody",{children:t.map(((e,n)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:o[n]})," ",e.map(((e,n)=>(0,r.jsx)("td",{children:"boolean"==typeof e?e.toString().charAt(0).toUpperCase()+e.toString().slice(1):e},n)))]},n)))})]})})}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var r=s(6540);const t={},c=r.createContext(t);function o(e){const n=r.useContext(c);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5cae8acf.80382e0e.js b/assets/js/5cae8acf.80382e0e.js new file mode 100644 index 00000000..1cbe5648 --- /dev/null +++ b/assets/js/5cae8acf.80382e0e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[3483],{5001:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>o,toc:()=>l});var r=s(4848),t=s(8453),a=s(8597);const c={sidebar_position:7},d=void 0,o={id:"grouping",title:"grouping",description:"df.groupby(columnname)ordf.groupby([columnnames])",source:"@site/docs/grouping.md",sourceDirName:".",slug:"/grouping",permalink:"/bpd-reference/docs/grouping",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/docs/grouping.md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"histogram",permalink:"/bpd-reference/docs/plotting/histogram"},next:{title:"Tutorial - Basics",permalink:"/bpd-reference/docs/category/tutorial---basics"}},i={},l=[];function m(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("code",{children:"df.groupby(column_name)"}),"\n",(0,r.jsx)("strong",{children:"or"}),"\n",(0,r.jsx)("code",{children:"df.groupby([column_names])"}),"\n",(0,r.jsxs)("div",{className:"base",children:[(0,r.jsxs)("p",{children:[(0,r.jsxs)("strong",{children:["Group DataFrame by values in columns specified in ",(0,r.jsx)("em",{children:"column_name"})," or a list of ",(0,r.jsx)("em",{children:"column_names"})]}),"."]}),(0,r.jsx)("p",{children:"A groupby operation groups large amounts of data based on the column name(s)"}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Input:"}),(0,r.jsxs)("dd",{className:"parameter",children:["column_name : ",(0,r.jsx)("em",{children:"string"})]}),(0,r.jsx)("dd",{className:"parameter-description",children:"Groups by the column specified. The column becomes the index."}),(0,r.jsxs)("dd",{className:"parameter",children:["column_names : ",(0,r.jsx)("em",{children:"list"})," (of strings)"]}),(0,r.jsx)("dd",{className:"parameter-description",children:"Groups by all listed columns, starting with the first one in the list. The columns become the indices."}),(0,r.jsx)("dt",{className:"term",children:"Note:"}),(0,r.jsxs)("dd",{children:["Grouping without an ",(0,r.jsx)("strong",{children:"aggregate method"})," will return a DataFrameGroupBy object (not DataFrame)"]})]}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Aggregate Methods"})}),"\n",(0,r.jsx)("code",{children:".mean()"})," \xa0 ",(0,r.jsx)("code",{children:".median()"})," \xa0 ",(0,r.jsx)("code",{children:".count()"})," \xa0 ",(0,r.jsx)("code",{children:".max()"})," \xa0 ",(0,r.jsx)("code",{children:".min()"})," \xa0 ",(0,r.jsx)("code",{children:".sum()"})]})]}),"\n",(0,r.jsx)("code",{children:"df.groupby(column_name).aggregate_method()"}),"\n",(0,r.jsx)("div",{className:"base",children:(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Returns:"}),(0,r.jsx)("dd",{children:"A new DataFrame with the parameter column(s) as the index and all other columns grouped."}),(0,r.jsx)("dt",{className:"term",children:"Return Type:"}),(0,r.jsx)("dd",{children:"DataFrame"})]})}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"pets\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"columns":["Species","Color","Weight","Age"],"index":[0,1,2,3,4,5,6],"data":[["dog","black",40.0,5.0],["cat","golden",15.0,8.0],["cat","black",20.0,9.0],["dog","white",80.0,2.0],["dog","black",25.0,0.5],["hamster","black",1.0,3.0],["hamster","golden",0.25,0.2]]}'}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"pets.groupby('Species').count()\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"columns":["ID","Color","Weight","Age"],"index":["cat","dog","hamster"],"data":[[2,2,2,2],[3,3,3,3],[2,2,2,2]]}'})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},8597:(e,n,s)=>{s.d(n,{A:()=>t});s(6540);var r=s(4848);const t=e=>{let{data:n}=e,s=[],t=[],a="",c=[];if(n){const e=JSON.parse(n);s=e.columns||[],t=e.data||[],a=e.indexName||"Index",c=e.index||[]}return(0,r.jsx)("div",{className:"dataframe-container",children:(0,r.jsxs)("table",{className:"dataframe-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:a})," ",s.map(((e,n)=>(0,r.jsx)("th",{children:e},n)))]})}),(0,r.jsx)("tbody",{children:t.map(((e,n)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:c[n]})," ",e.map(((e,n)=>(0,r.jsx)("td",{children:"boolean"==typeof e?e.toString().charAt(0).toUpperCase()+e.toString().slice(1):e},n)))]},n)))})]})})}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>d});var r=s(6540);const t={},a=r.createContext(t);function c(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.4b144337.js b/assets/js/runtime~main.90d37ac2.js similarity index 99% rename from assets/js/runtime~main.4b144337.js rename to assets/js/runtime~main.90d37ac2.js index b2e87b34..45ba8c72 100644 --- a/assets/js/runtime~main.4b144337.js +++ b/assets/js/runtime~main.90d37ac2.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,f,c,d,b={},r={};function t(e){var a=r[e];if(void 0!==a)return a.exports;var f=r[e]={id:e,loaded:!1,exports:{}};return b[e].call(f.exports,f,f.exports,t),f.loaded=!0,f.exports}t.m=b,t.c=r,e=[],t.O=(a,f,c,d)=>{if(!f){var b=1/0;for(i=0;i=d)&&Object.keys(t.O).every((e=>t.O[e](f[o])))?f.splice(o--,1):(r=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[f,c,d]},t.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,t.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);t.r(d);var b={};a=a||[null,f({}),f([]),f(f)];for(var r=2&c&&e;"object"==typeof r&&!~a.indexOf(r);r=f(r))Object.getOwnPropertyNames(r).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,t.d(d,b),d},t.d=(e,a)=>{for(var f in a)t.o(a,f)&&!t.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce(((a,f)=>(t.f[f](e,a),a)),[])),t.u=e=>"assets/js/"+({10:"449c944f",59:"f9e6e799",122:"3c176041",339:"8fb6bffd",647:"db012a9c",683:"dd35b4d6",709:"1ae55b72",1162:"ecffc2db",1607:"faf9f7da",1644:"c7c46bce",1724:"dff1c289",1819:"d6e622cf",1903:"acecf23e",1953:"1e4232ab",1972:"73664a40",1974:"5c868d36",2634:"c4f5d8e4",2711:"9e4087bc",2748:"822bd8ab",3098:"533a09ca",3249:"ccc49370",3483:"5cae8acf",3554:"cb884b48",3626:"d8c458b9",3637:"f4f34a3a",3694:"8717b14a",3976:"0e384e19",4014:"8cfe8d4e",4134:"393be207",4736:"e44a2883",4761:"db55d312",4813:"6875c492",5391:"cd451366",5427:"956f17b0",5443:"add9b02f",5480:"09399a2b",5521:"38b2e376",5557:"d9f32620",5589:"ea885f1b",5612:"8216cb10",6061:"1f391b9e",6157:"8281cf06",6625:"4d1f5c9d",6925:"ecad1ce6",6969:"14eb3368",7098:"a7bd4aaa",7117:"eb5ef7c5",7472:"814f3328",7643:"a6aa9e1f",8209:"01a85c17",8401:"17896441",8405:"6d7cf8c9",8510:"6669e58d",8559:"3349ad3a",8581:"935f2afb",8609:"925b3f96",8737:"7661071f",8819:"f1d17ea9",8863:"f55d3e7a",9048:"a94703ab",9262:"18c41134",9325:"59362658",9328:"e273c56f",9647:"5e95c892",9749:"9ee63435",9797:"85bbc213",9799:"44007711",9926:"67908667"}[e]||e)+"."+{10:"bd64ac43",59:"b2626294",122:"89c40c25",339:"c1d2b29e",647:"61005b42",683:"db5bb6f5",709:"23cc9e4d",1162:"40929b4c",1607:"a670a186",1644:"74ff4ff5",1724:"80c3a789",1819:"1ff2801d",1903:"978cac9e",1953:"6d209474",1972:"6864c464",1974:"67ff9f85",2237:"e9544c0b",2634:"3db290d2",2711:"4f5138d5",2748:"9488a836",3098:"5e89ae16",3242:"72fbb86d",3249:"12efda39",3483:"3fd1f232",3554:"206678b1",3626:"402ecb5d",3637:"b17e442f",3694:"5454028b",3976:"306e4829",4014:"27079b41",4134:"6cb884a7",4736:"0423081c",4761:"3415eebc",4813:"aed177af",5391:"27038027",5427:"95f66799",5443:"bf2acfd8",5480:"c91de645",5521:"3d83e140",5557:"95fd1299",5589:"9a7123df",5612:"67891355",6061:"4931dd9a",6157:"dd71d0c7",6264:"ae06de1c",6625:"0dc0d098",6925:"45e66795",6969:"9e5192b3",7098:"89c24f1c",7117:"e95ca3cc",7472:"2a71da77",7643:"d5e01cc6",8209:"8b130ac7",8401:"114748a5",8405:"81b437c0",8510:"455ef7ed",8559:"33a087db",8581:"0e7cc4c4",8609:"cba4ee15",8737:"0e3fda52",8819:"bd390ccf",8863:"a744d5a2",9048:"f1dfcffe",9262:"fe163b44",9325:"777bc4c6",9328:"f95f7890",9647:"95974c14",9749:"944918d4",9797:"59604264",9799:"181ead39",9926:"f968f01c"}[e]+".js",t.miniCssF=e=>{},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="bpd-reference:",t.l=(e,a,f,b)=>{if(c[e])c[e].push(a);else{var r,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{r.onerror=r.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],r.parentNode&&r.parentNode.removeChild(r),d&&d.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=l.bind(null,r.onerror),r.onload=l.bind(null,r.onload),o&&document.head.appendChild(r)}},t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/bpd-reference/",t.gca=function(e){return e={17896441:"8401",44007711:"9799",59362658:"9325",67908667:"9926","449c944f":"10",f9e6e799:"59","3c176041":"122","8fb6bffd":"339",db012a9c:"647",dd35b4d6:"683","1ae55b72":"709",ecffc2db:"1162",faf9f7da:"1607",c7c46bce:"1644",dff1c289:"1724",d6e622cf:"1819",acecf23e:"1903","1e4232ab":"1953","73664a40":"1972","5c868d36":"1974",c4f5d8e4:"2634","9e4087bc":"2711","822bd8ab":"2748","533a09ca":"3098",ccc49370:"3249","5cae8acf":"3483",cb884b48:"3554",d8c458b9:"3626",f4f34a3a:"3637","8717b14a":"3694","0e384e19":"3976","8cfe8d4e":"4014","393be207":"4134",e44a2883:"4736",db55d312:"4761","6875c492":"4813",cd451366:"5391","956f17b0":"5427",add9b02f:"5443","09399a2b":"5480","38b2e376":"5521",d9f32620:"5557",ea885f1b:"5589","8216cb10":"5612","1f391b9e":"6061","8281cf06":"6157","4d1f5c9d":"6625",ecad1ce6:"6925","14eb3368":"6969",a7bd4aaa:"7098",eb5ef7c5:"7117","814f3328":"7472",a6aa9e1f:"7643","01a85c17":"8209","6d7cf8c9":"8405","6669e58d":"8510","3349ad3a":"8559","935f2afb":"8581","925b3f96":"8609","7661071f":"8737",f1d17ea9:"8819",f55d3e7a:"8863",a94703ab:"9048","18c41134":"9262",e273c56f:"9328","5e95c892":"9647","9ee63435":"9749","85bbc213":"9797"}[e]||e,t.p+t.u(e)},(()=>{var e={5354:0,1869:0};t.f.j=(a,f)=>{var c=t.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((f,d)=>c=e[a]=[f,d]));f.push(c[2]=d);var b=t.p+t.u(a),r=new Error;t.l(b,(f=>{if(t.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;r.message="Loading chunk "+a+" failed.\n("+d+": "+b+")",r.name="ChunkLoadError",r.type=d,r.request=b,c[1](r)}}),"chunk-"+a,a)}},t.O.j=a=>0===e[a];var a=(a,f)=>{var c,d,b=f[0],r=f[1],o=f[2],n=0;if(b.some((a=>0!==e[a]))){for(c in r)t.o(r,c)&&(t.m[c]=r[c]);if(o)var i=o(t)}for(a&&a(f);n{"use strict";var e,a,f,c,d,b={},r={};function t(e){var a=r[e];if(void 0!==a)return a.exports;var f=r[e]={id:e,loaded:!1,exports:{}};return b[e].call(f.exports,f,f.exports,t),f.loaded=!0,f.exports}t.m=b,t.c=r,e=[],t.O=(a,f,c,d)=>{if(!f){var b=1/0;for(i=0;i=d)&&Object.keys(t.O).every((e=>t.O[e](f[o])))?f.splice(o--,1):(r=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[f,c,d]},t.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,t.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var d=Object.create(null);t.r(d);var b={};a=a||[null,f({}),f([]),f(f)];for(var r=2&c&&e;"object"==typeof r&&!~a.indexOf(r);r=f(r))Object.getOwnPropertyNames(r).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,t.d(d,b),d},t.d=(e,a)=>{for(var f in a)t.o(a,f)&&!t.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce(((a,f)=>(t.f[f](e,a),a)),[])),t.u=e=>"assets/js/"+({10:"449c944f",59:"f9e6e799",122:"3c176041",339:"8fb6bffd",647:"db012a9c",683:"dd35b4d6",709:"1ae55b72",1162:"ecffc2db",1607:"faf9f7da",1644:"c7c46bce",1724:"dff1c289",1819:"d6e622cf",1903:"acecf23e",1953:"1e4232ab",1972:"73664a40",1974:"5c868d36",2634:"c4f5d8e4",2711:"9e4087bc",2748:"822bd8ab",3098:"533a09ca",3249:"ccc49370",3483:"5cae8acf",3554:"cb884b48",3626:"d8c458b9",3637:"f4f34a3a",3694:"8717b14a",3976:"0e384e19",4014:"8cfe8d4e",4134:"393be207",4736:"e44a2883",4761:"db55d312",4813:"6875c492",5391:"cd451366",5427:"956f17b0",5443:"add9b02f",5480:"09399a2b",5521:"38b2e376",5557:"d9f32620",5589:"ea885f1b",5612:"8216cb10",6061:"1f391b9e",6157:"8281cf06",6625:"4d1f5c9d",6925:"ecad1ce6",6969:"14eb3368",7098:"a7bd4aaa",7117:"eb5ef7c5",7472:"814f3328",7643:"a6aa9e1f",8209:"01a85c17",8401:"17896441",8405:"6d7cf8c9",8510:"6669e58d",8559:"3349ad3a",8581:"935f2afb",8609:"925b3f96",8737:"7661071f",8819:"f1d17ea9",8863:"f55d3e7a",9048:"a94703ab",9262:"18c41134",9325:"59362658",9328:"e273c56f",9647:"5e95c892",9749:"9ee63435",9797:"85bbc213",9799:"44007711",9926:"67908667"}[e]||e)+"."+{10:"bd64ac43",59:"b2626294",122:"89c40c25",339:"c1d2b29e",647:"61005b42",683:"db5bb6f5",709:"23cc9e4d",1162:"40929b4c",1607:"a670a186",1644:"74ff4ff5",1724:"80c3a789",1819:"1ff2801d",1903:"978cac9e",1953:"6d209474",1972:"6864c464",1974:"67ff9f85",2237:"e9544c0b",2634:"3db290d2",2711:"4f5138d5",2748:"9488a836",3098:"5e89ae16",3242:"72fbb86d",3249:"12efda39",3483:"80382e0e",3554:"206678b1",3626:"402ecb5d",3637:"b17e442f",3694:"5454028b",3976:"306e4829",4014:"27079b41",4134:"6cb884a7",4736:"0423081c",4761:"3415eebc",4813:"aed177af",5391:"27038027",5427:"95f66799",5443:"bf2acfd8",5480:"c91de645",5521:"3d83e140",5557:"95fd1299",5589:"9a7123df",5612:"67891355",6061:"4931dd9a",6157:"dd71d0c7",6264:"ae06de1c",6625:"0dc0d098",6925:"45e66795",6969:"9e5192b3",7098:"89c24f1c",7117:"e95ca3cc",7472:"2a71da77",7643:"d5e01cc6",8209:"8b130ac7",8401:"114748a5",8405:"81b437c0",8510:"455ef7ed",8559:"33a087db",8581:"0e7cc4c4",8609:"cba4ee15",8737:"0e3fda52",8819:"bd390ccf",8863:"a744d5a2",9048:"f1dfcffe",9262:"fe163b44",9325:"777bc4c6",9328:"f95f7890",9647:"95974c14",9749:"944918d4",9797:"59604264",9799:"181ead39",9926:"f968f01c"}[e]+".js",t.miniCssF=e=>{},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},d="bpd-reference:",t.l=(e,a,f,b)=>{if(c[e])c[e].push(a);else{var r,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{r.onerror=r.onload=null,clearTimeout(s);var d=c[e];if(delete c[e],r.parentNode&&r.parentNode.removeChild(r),d&&d.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=l.bind(null,r.onerror),r.onload=l.bind(null,r.onload),o&&document.head.appendChild(r)}},t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="/bpd-reference/",t.gca=function(e){return e={17896441:"8401",44007711:"9799",59362658:"9325",67908667:"9926","449c944f":"10",f9e6e799:"59","3c176041":"122","8fb6bffd":"339",db012a9c:"647",dd35b4d6:"683","1ae55b72":"709",ecffc2db:"1162",faf9f7da:"1607",c7c46bce:"1644",dff1c289:"1724",d6e622cf:"1819",acecf23e:"1903","1e4232ab":"1953","73664a40":"1972","5c868d36":"1974",c4f5d8e4:"2634","9e4087bc":"2711","822bd8ab":"2748","533a09ca":"3098",ccc49370:"3249","5cae8acf":"3483",cb884b48:"3554",d8c458b9:"3626",f4f34a3a:"3637","8717b14a":"3694","0e384e19":"3976","8cfe8d4e":"4014","393be207":"4134",e44a2883:"4736",db55d312:"4761","6875c492":"4813",cd451366:"5391","956f17b0":"5427",add9b02f:"5443","09399a2b":"5480","38b2e376":"5521",d9f32620:"5557",ea885f1b:"5589","8216cb10":"5612","1f391b9e":"6061","8281cf06":"6157","4d1f5c9d":"6625",ecad1ce6:"6925","14eb3368":"6969",a7bd4aaa:"7098",eb5ef7c5:"7117","814f3328":"7472",a6aa9e1f:"7643","01a85c17":"8209","6d7cf8c9":"8405","6669e58d":"8510","3349ad3a":"8559","935f2afb":"8581","925b3f96":"8609","7661071f":"8737",f1d17ea9:"8819",f55d3e7a:"8863",a94703ab:"9048","18c41134":"9262",e273c56f:"9328","5e95c892":"9647","9ee63435":"9749","85bbc213":"9797"}[e]||e,t.p+t.u(e)},(()=>{var e={5354:0,1869:0};t.f.j=(a,f)=>{var c=t.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((f,d)=>c=e[a]=[f,d]));f.push(c[2]=d);var b=t.p+t.u(a),r=new Error;t.l(b,(f=>{if(t.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var d=f&&("load"===f.type?"missing":f.type),b=f&&f.target&&f.target.src;r.message="Loading chunk "+a+" failed.\n("+d+": "+b+")",r.name="ChunkLoadError",r.type=d,r.request=b,c[1](r)}}),"chunk-"+a,a)}},t.O.j=a=>0===e[a];var a=(a,f)=>{var c,d,b=f[0],r=f[1],o=f[2],n=0;if(b.some((a=>0!==e[a]))){for(c in r)t.o(r,c)&&(t.m[c]=r[c]);if(o)var i=o(t)}for(a&&a(f);n Archive | bpd - + diff --git a/blog/first-blog-post/index.html b/blog/first-blog-post/index.html index dd0a8869..988ba8fb 100644 --- a/blog/first-blog-post/index.html +++ b/blog/first-blog-post/index.html @@ -5,7 +5,7 @@ First Blog Post | bpd - + diff --git a/blog/index.html b/blog/index.html index a62b6144..6d23fdcb 100644 --- a/blog/index.html +++ b/blog/index.html @@ -5,7 +5,7 @@ Blog | bpd - + diff --git a/blog/long-blog-post/index.html b/blog/long-blog-post/index.html index 4c5f1c98..93cdcb75 100644 --- a/blog/long-blog-post/index.html +++ b/blog/long-blog-post/index.html @@ -5,7 +5,7 @@ Long Blog Post | bpd - + diff --git a/blog/mdx-blog-post/index.html b/blog/mdx-blog-post/index.html index ebe225f4..baf80364 100644 --- a/blog/mdx-blog-post/index.html +++ b/blog/mdx-blog-post/index.html @@ -5,7 +5,7 @@ MDX Blog Post | bpd - + diff --git a/blog/tags/docusaurus/index.html b/blog/tags/docusaurus/index.html index af6c6931..48b935aa 100644 --- a/blog/tags/docusaurus/index.html +++ b/blog/tags/docusaurus/index.html @@ -5,7 +5,7 @@ 4 posts tagged with "docusaurus" | bpd - + diff --git a/blog/tags/facebook/index.html b/blog/tags/facebook/index.html index 4d579b45..1f603064 100644 --- a/blog/tags/facebook/index.html +++ b/blog/tags/facebook/index.html @@ -5,7 +5,7 @@ One post tagged with "facebook" | bpd - + diff --git a/blog/tags/hello/index.html b/blog/tags/hello/index.html index dd2de4f0..9a9e6ea6 100644 --- a/blog/tags/hello/index.html +++ b/blog/tags/hello/index.html @@ -5,7 +5,7 @@ 2 posts tagged with "hello" | bpd - + diff --git a/blog/tags/hola/index.html b/blog/tags/hola/index.html index 58e2b449..20bf92af 100644 --- a/blog/tags/hola/index.html +++ b/blog/tags/hola/index.html @@ -5,7 +5,7 @@ One post tagged with "hola" | bpd - + diff --git a/blog/tags/index.html b/blog/tags/index.html index b35aa370..6e1c291a 100644 --- a/blog/tags/index.html +++ b/blog/tags/index.html @@ -5,7 +5,7 @@ Tags | bpd - + diff --git a/blog/welcome/index.html b/blog/welcome/index.html index 33addb9d..0756e595 100644 --- a/blog/welcome/index.html +++ b/blog/welcome/index.html @@ -5,7 +5,7 @@ Welcome | bpd - + diff --git a/docs/accessing-data/df.shape/index.html b/docs/accessing-data/df.shape/index.html index 1931ef28..32cded01 100644 --- a/docs/accessing-data/df.shape/index.html +++ b/docs/accessing-data/df.shape/index.html @@ -5,7 +5,7 @@ df.shape | bpd - + diff --git a/docs/arrays-and-numpy/arr[]/index.html b/docs/arrays-and-numpy/arr[]/index.html index 133a3d12..3869288a 100644 --- a/docs/arrays-and-numpy/arr[]/index.html +++ b/docs/arrays-and-numpy/arr[]/index.html @@ -5,7 +5,7 @@ arr[] | bpd - + diff --git a/docs/building-organizing/bpd.DataFrame()/index.html b/docs/building-organizing/bpd.DataFrame()/index.html index aff575c9..6e41fb3f 100644 --- a/docs/building-organizing/bpd.DataFrame()/index.html +++ b/docs/building-organizing/bpd.DataFrame()/index.html @@ -5,7 +5,7 @@ bpd.DataFrame() | bpd - + diff --git a/docs/building-organizing/bpd.read_csv()/index.html b/docs/building-organizing/bpd.read_csv()/index.html index 23b28f07..9d1a450f 100644 --- a/docs/building-organizing/bpd.read_csv()/index.html +++ b/docs/building-organizing/bpd.read_csv()/index.html @@ -5,7 +5,7 @@ bpd.read_csv() | bpd - + diff --git a/docs/building-organizing/df.assign()/index.html b/docs/building-organizing/df.assign()/index.html index 9216d8eb..83a39916 100644 --- a/docs/building-organizing/df.assign()/index.html +++ b/docs/building-organizing/df.assign()/index.html @@ -5,7 +5,7 @@ df.assign() | bpd - + diff --git a/docs/building-organizing/df.drop()/index.html b/docs/building-organizing/df.drop()/index.html index fc4da1b7..4c7e4d8f 100644 --- a/docs/building-organizing/df.drop()/index.html +++ b/docs/building-organizing/df.drop()/index.html @@ -5,7 +5,7 @@ df.drop() | bpd - + diff --git a/docs/building-organizing/df.merge()/index.html b/docs/building-organizing/df.merge()/index.html index fa31826d..56691b60 100644 --- a/docs/building-organizing/df.merge()/index.html +++ b/docs/building-organizing/df.merge()/index.html @@ -5,7 +5,7 @@ df.merge() | bpd - + diff --git a/docs/building-organizing/df.reset_index()/index.html b/docs/building-organizing/df.reset_index()/index.html index 8eccb7b5..73d1bf47 100644 --- a/docs/building-organizing/df.reset_index()/index.html +++ b/docs/building-organizing/df.reset_index()/index.html @@ -5,7 +5,7 @@ df.reset_index() | bpd - + diff --git a/docs/building-organizing/df.set_index()/index.html b/docs/building-organizing/df.set_index()/index.html index 8687e0bf..a9cc7f72 100644 --- a/docs/building-organizing/df.set_index()/index.html +++ b/docs/building-organizing/df.set_index()/index.html @@ -5,7 +5,7 @@ df.set_index() | bpd - + diff --git a/docs/building-organizing/df.sort_values()/index.html b/docs/building-organizing/df.sort_values()/index.html index c734a967..e282c8a2 100644 --- a/docs/building-organizing/df.sort_values()/index.html +++ b/docs/building-organizing/df.sort_values()/index.html @@ -5,7 +5,7 @@ df.sort_values() | bpd - + diff --git a/docs/category/accessing-data/index.html b/docs/category/accessing-data/index.html index 4a9a1660..cfc29ee8 100644 --- a/docs/category/accessing-data/index.html +++ b/docs/category/accessing-data/index.html @@ -5,7 +5,7 @@ accessing data | bpd - + diff --git a/docs/category/arrays-and-numpy/index.html b/docs/category/arrays-and-numpy/index.html index 24f02e95..0d68eba4 100644 --- a/docs/category/arrays-and-numpy/index.html +++ b/docs/category/arrays-and-numpy/index.html @@ -5,7 +5,7 @@ arrays and numpy | bpd - + diff --git a/docs/category/building-and-organizing-dataframes/index.html b/docs/category/building-and-organizing-dataframes/index.html index 364d67c1..80a12a32 100644 --- a/docs/category/building-and-organizing-dataframes/index.html +++ b/docs/category/building-and-organizing-dataframes/index.html @@ -5,7 +5,7 @@ building and organizing DataFrames | bpd - + diff --git a/docs/category/plotting/index.html b/docs/category/plotting/index.html index 61f6a55f..dbb4ef68 100644 --- a/docs/category/plotting/index.html +++ b/docs/category/plotting/index.html @@ -5,7 +5,7 @@ plotting | bpd - + diff --git a/docs/category/series-methods/index.html b/docs/category/series-methods/index.html index 81e01eb6..910ae8cd 100644 --- a/docs/category/series-methods/index.html +++ b/docs/category/series-methods/index.html @@ -5,7 +5,7 @@ series methods | bpd - + diff --git a/docs/category/tutorial---basics/index.html b/docs/category/tutorial---basics/index.html index 0fd465a7..051d12cd 100644 --- a/docs/category/tutorial---basics/index.html +++ b/docs/category/tutorial---basics/index.html @@ -5,7 +5,7 @@ Tutorial - Basics | bpd - + diff --git a/docs/category/tutorial---extras/index.html b/docs/category/tutorial---extras/index.html index 99521757..e6168e00 100644 --- a/docs/category/tutorial---extras/index.html +++ b/docs/category/tutorial---extras/index.html @@ -5,7 +5,7 @@ Tutorial - Extras | bpd - + diff --git a/docs/grouping/index.html b/docs/grouping/index.html index a81c8e18..6facb799 100644 --- a/docs/grouping/index.html +++ b/docs/grouping/index.html @@ -5,17 +5,17 @@ grouping | bpd - +

grouping

df.groupby(column_name) or df.groupby([column_names]) -

Group DataFrame by values in columns specified in column_name or a list of column_names.

A groupby operation groups large amounts of data based on the column name(s)

Input:
column_name : string
Groups by the column specified. The column becomes the index.
column_names : list (of strings)
Groups by all listed columns, starting with the first one in the list. The columns become the indices.
Note:
Grouping without an aggregate method will return a DataFrameGroupBy object (not DataFrame)
-

Aggregate Methods

-.mean()   .median()   .count()   .max()   .min()   .sum()

-
Returns:
df_gb - groupby object that contains information about the groups.
Return Type:
DataFrameGroupBy
+

Group DataFrame by values in columns specified in column_name or a list of column_names.

A groupby operation groups large amounts of data based on the column name(s)

Input:
column_name : string
Groups by the column specified. The column becomes the index.
column_names : list (of strings)
Groups by all listed columns, starting with the first one in the list. The columns become the indices.
Note:
Grouping without an aggregate method will return a DataFrameGroupBy object (not DataFrame)

Aggregate Methods

+.mean()   .median()   .count()   .max()   .min()   .sum()

+df.groupby(column_name).aggregate_method() +
Returns:
A new DataFrame with the parameter column(s) as the index and all other columns grouped.
Return Type:
DataFrame

pets
Index SpeciesColorWeightAge
0 dogblack405
1 catgolden158
2 catblack209
3 dogwhite802
4 dogblack250.5
5 hamsterblack13
6 hamstergolden0.250.2
diff --git a/docs/intro/index.html b/docs/intro/index.html index de2ac5fc..0727af65 100644 --- a/docs/intro/index.html +++ b/docs/intro/index.html @@ -5,7 +5,7 @@ intro | bpd - + diff --git a/docs/plotting/histogram/index.html b/docs/plotting/histogram/index.html index bd741a0d..6a6e4427 100644 --- a/docs/plotting/histogram/index.html +++ b/docs/plotting/histogram/index.html @@ -5,7 +5,7 @@ histogram | bpd - + diff --git a/docs/series-methods/ser.count()/index.html b/docs/series-methods/ser.count()/index.html index afcdfb4f..9851dc88 100644 --- a/docs/series-methods/ser.count()/index.html +++ b/docs/series-methods/ser.count()/index.html @@ -5,7 +5,7 @@ ser.count() | bpd - + diff --git a/docs/series-methods/ser.max()/index.html b/docs/series-methods/ser.max()/index.html index 88fd83e7..00c0c4d3 100644 --- a/docs/series-methods/ser.max()/index.html +++ b/docs/series-methods/ser.max()/index.html @@ -5,7 +5,7 @@ ser.max() | bpd - + diff --git a/docs/tutorial-basics/congratulations/index.html b/docs/tutorial-basics/congratulations/index.html index cd49f647..c4a9c4c1 100644 --- a/docs/tutorial-basics/congratulations/index.html +++ b/docs/tutorial-basics/congratulations/index.html @@ -5,7 +5,7 @@ Congratulations! | bpd - + diff --git a/docs/tutorial-basics/create-a-blog-post/index.html b/docs/tutorial-basics/create-a-blog-post/index.html index 69780510..5b82ffec 100644 --- a/docs/tutorial-basics/create-a-blog-post/index.html +++ b/docs/tutorial-basics/create-a-blog-post/index.html @@ -5,7 +5,7 @@ Create a Blog Post | bpd - + diff --git a/docs/tutorial-basics/create-a-document/index.html b/docs/tutorial-basics/create-a-document/index.html index 666edc79..7963b9ea 100644 --- a/docs/tutorial-basics/create-a-document/index.html +++ b/docs/tutorial-basics/create-a-document/index.html @@ -5,7 +5,7 @@ Create a Document | bpd - + diff --git a/docs/tutorial-basics/create-a-page/index.html b/docs/tutorial-basics/create-a-page/index.html index 0517a8db..0df507fe 100644 --- a/docs/tutorial-basics/create-a-page/index.html +++ b/docs/tutorial-basics/create-a-page/index.html @@ -5,7 +5,7 @@ Create a Page | bpd - + diff --git a/docs/tutorial-basics/deploy-your-site/index.html b/docs/tutorial-basics/deploy-your-site/index.html index 12ba3d5b..aa6232a4 100644 --- a/docs/tutorial-basics/deploy-your-site/index.html +++ b/docs/tutorial-basics/deploy-your-site/index.html @@ -5,7 +5,7 @@ Deploy your site | bpd - + diff --git a/docs/tutorial-basics/markdown-features/index.html b/docs/tutorial-basics/markdown-features/index.html index 8068920a..e73621d6 100644 --- a/docs/tutorial-basics/markdown-features/index.html +++ b/docs/tutorial-basics/markdown-features/index.html @@ -5,7 +5,7 @@ Markdown Features | bpd - + diff --git a/docs/tutorial-extras/manage-docs-versions/index.html b/docs/tutorial-extras/manage-docs-versions/index.html index dd012bdb..c435082e 100644 --- a/docs/tutorial-extras/manage-docs-versions/index.html +++ b/docs/tutorial-extras/manage-docs-versions/index.html @@ -5,7 +5,7 @@ Manage Docs Versions | bpd - + diff --git a/docs/tutorial-extras/translate-your-site/index.html b/docs/tutorial-extras/translate-your-site/index.html index 5f95e211..c0920edc 100644 --- a/docs/tutorial-extras/translate-your-site/index.html +++ b/docs/tutorial-extras/translate-your-site/index.html @@ -5,7 +5,7 @@ Translate your site | bpd - + diff --git a/index.html b/index.html index c6a5902d..6af32f7c 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ bpd reference sheet | bpd - + diff --git a/markdown-page/index.html b/markdown-page/index.html index aeffa68e..a83369a5 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -5,7 +5,7 @@ Markdown page example | bpd - +