diff --git a/404.html b/404.html index 2e1b29d3..c643a3b5 100644 --- a/404.html +++ b/404.html @@ -5,7 +5,7 @@ Page Not Found | bpd - + diff --git a/assets/js/5cae8acf.a848e857.js b/assets/js/5cae8acf.a848e857.js deleted file mode 100644 index 660f429f..00000000 --- a/assets/js/5cae8acf.a848e857.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:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=s(4848),t=s(8453),c=s(8597);const a={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)("strong",{children:"ex. "}),"\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)(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="",a=[];if(n){const e=JSON.parse(n);s=e.columns||[],t=e.data||[],c=e.indexName||"Index",a=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:a[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:()=>a,x:()=>d});var r=s(6540);const t={},c=r.createContext(t);function a(e){const n=r.useContext(c);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:a(e.components),r.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5cae8acf.c1f703e6.js b/assets/js/5cae8acf.c1f703e6.js new file mode 100644 index 00000000..52d4a1c5 --- /dev/null +++ b/assets/js/5cae8acf.c1f703e6.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:()=>a,metadata:()=>o,toc:()=>l});var r=s(4848),t=s(8453),c=s(8597);const a={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.jsx)("dl",{children:(0,r.jsxs)(n.p,{children:[(0,r.jsx)("dt",{className:"term",children:"Input:"}),"\n",(0,r.jsxs)("dd",{className:"parameter",children:["column_name : ",(0,r.jsx)("em",{children:"string"})]}),"\n",(0,r.jsx)("dd",{className:"parameter-description",children:"Groups by the column specified. The column becomes the index."}),"\n",(0,r.jsxs)("dd",{className:"parameter",children:["column_names : ",(0,r.jsx)("em",{children:"list"})," (of strings)"]}),"\n",(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."}),"\n",(0,r.jsx)("dt",{className:"term",children:"Note:"}),"\n",(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.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)("strong",{children:"ex. "}),"\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)(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="",a=[];if(n){const e=JSON.parse(n);s=e.columns||[],t=e.data||[],c=e.indexName||"Index",a=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:a[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:()=>a,x:()=>d});var r=s(6540);const t={},c=r.createContext(t);function a(e){const n=r.useContext(c);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:a(e.components),r.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.645a5b91.js b/assets/js/runtime~main.b3e82bc9.js similarity index 64% rename from assets/js/runtime~main.645a5b91.js rename to assets/js/runtime~main.b3e82bc9.js index cc66bfd6..a6ecc355 100644 --- a/assets/js/runtime~main.645a5b91.js +++ b/assets/js/runtime~main.b3e82bc9.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,f,d,b={},r={};function t(e){var a=r[e];if(void 0!==a)return a.exports;var c=r[e]={id:e,loaded:!1,exports:{}};return b[e].call(c.exports,c,c.exports,t),c.loaded=!0,c.exports}t.m=b,t.c=r,e=[],t.O=(a,c,f,d)=>{if(!c){var b=1/0;for(i=0;i=d)&&Object.keys(t.O).every((e=>t.O[e](c[o])))?c.splice(o--,1):(r=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[c,f,d]},t.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,t.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var d=Object.create(null);t.r(d);var b={};a=a||[null,c({}),c([]),c(c)];for(var r=2&f&&e;"object"==typeof r&&!~a.indexOf(r);r=c(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 c in a)t.o(a,c)&&!t.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce(((a,c)=>(t.f[c](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:"a848e857",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),f={},d="bpd-reference:",t.l=(e,a,c,b)=>{if(f[e])f[e].push(a);else{var r,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{r.onerror=r.onload=null,clearTimeout(s);var d=f[e];if(delete f[e],r.parentNode&&r.parentNode.removeChild(r),d&&d.forEach((e=>e(c))),a)return a(c)},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,c)=>{var f=t.o(e,a)?e[a]:void 0;if(0!==f)if(f)c.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((c,d)=>f=e[a]=[c,d]));c.push(f[2]=d);var b=t.p+t.u(a),r=new Error;t.l(b,(c=>{if(t.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var d=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;r.message="Loading chunk "+a+" failed.\n("+d+": "+b+")",r.name="ChunkLoadError",r.type=d,r.request=b,f[1](r)}}),"chunk-"+a,a)}},t.O.j=a=>0===e[a];var a=(a,c)=>{var f,d,b=c[0],r=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(f in r)t.o(r,f)&&(t.m[f]=r[f]);if(o)var i=o(t)}for(a&&a(c);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:"c1f703e6",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 fd131933..e8603e10 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 36337f3e..20d5c15b 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 ee19278f..851f98c9 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 294a17e7..30904a0a 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 6ad6068a..eb3a0ad6 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 83fda387..418f4e1c 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 6fe47abc..eb504dd5 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 e0bcf1ff..654b68ef 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 34172d33..24851c3f 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 3b95884c..8adcb8d6 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 38b93851..afcda4bf 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 3560482e..904c2b1b 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 952dc4e2..32729f4f 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 fd5ced61..7e78e285 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 55188f45..437d1f48 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 700a1bc8..0ac78205 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 38d21da9..2e7fca3f 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 1b15f4f3..a8307c57 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 46a2fbbf..f684470c 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 e512585f..e4a9b6d6 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 ad1d45e3..54b7d53b 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 c60f2e3d..18053115 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 11a3aa35..0d1cff54 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 13184cc4..2f73a6ed 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 52d42c6e..d94b172e 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 a46c1b23..544af613 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 f0ce6c95..0f9bdff6 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 16067551..7923875f 100644 --- a/docs/grouping/index.html +++ b/docs/grouping/index.html @@ -5,15 +5,22 @@ 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()

+

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()

ex. 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
diff --git a/docs/intro/index.html b/docs/intro/index.html index ed413402..d3754d44 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 e5b4919b..ab2fb5e8 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 4723bb0f..622e528a 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 1e0ca325..87f19663 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 d7d94f8f..63e930a6 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 7c73deaa..6e91e2bd 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 b357b086..1b13d075 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 ce5994ba..cf9e5cf8 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 d47c72fd..a5f8dd50 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 8ed38415..c4f6a67c 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 279bcbaf..2b20adc4 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 17640dcf..1a6bcb8c 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 aac4e6f3..8bb5a270 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 b7b647a4..1408ac81 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -5,7 +5,7 @@ Markdown page example | bpd - +