Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/404.html b/404.html index dcb5786d..fbfc5a30 100644 --- a/404.html +++ b/404.html @@ -2,7 +2,7 @@
- +We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
["'])(?.*?)\1/,Ar=/\{(? [\d,-]+)\}/,Er={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Sr={...Er,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},Nr=Object.keys(Er);function jr(e,t){const n=e.map((e=>{const{start:n,end:s}=Sr[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function Rr(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:o,metastring:r}=t;if(r&&Ar.test(r)){const e=r.match(Ar).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${r}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=o[0].className,s=wr()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return jr(["js","jsBlock"],t);case"jsx":case"tsx":return jr(["js","jsBlock","jsx"],t);case"html":return jr(["js","jsBlock","html"],t);case"python":case"py":case"bash":return jr(["bash"],t);case"markdown":case"md":return jr(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return jr(["tex"],t);case"lua":case"haskell":case"sql":return jr(["lua"],t);case"wasm":return jr(["wasm"],t);case"vb":case"vba":case"visual-basic":return jr(["vb","rem"],t);case"vbnet":return jr(["vbnet","rem"],t);case"batch":return jr(["rem"],t);case"basic":return jr(["rem","f90"],t);case"fsharp":return jr(["js","ml"],t);case"ocaml":case"sml":return jr(["ml"],t);case"fortran":return jr(["f90"],t);case"cobol":return jr(["cobol"],t);default:return jr(Nr,t)}}(s,o),a=n.split("\n"),c=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),l=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),u=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),h=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let d=0;d void 0!==e));l[t]?c[l[t]].range+=`${d},`:u[t]?c[u[t]].start=d:h[t]&&(c[h[t]].range+=`${c[h[t]].start}-${d-1},`),a.splice(d,1)}n=a.join("\n");const p={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;wr()(n).forEach((e=>{p[e]??=[],p[e].push(t)}))})),{lineClassNames:p,code:n}}const Lr={codeBlockContainer:"codeBlockContainer_Ckt0"};function Or(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,o]=e;const r=t[s];r&&"string"==typeof o&&(n[r]=o)})),n}(hr());return(0,x.jsx)(t,{...n,style:s,className:(0,i.A)(n.className,Lr.codeBlockContainer,vr.G.common.codeBlock)})}const Dr={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function Pr(e){let{children:t,className:n}=e;return(0,x.jsx)(Or,{as:"pre",tabIndex:0,className:(0,i.A)(Dr.codeBlockStandalone,"thin-scrollbar",n),children:(0,x.jsx)("code",{className:Dr.codeBlockLines,children:t})})}var Br=n(9532);const qr={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Mr(e,t){const[n,o]=(0,s.useState)(),r=(0,s.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,s.useEffect)((()=>{r()}),[r]),function(e,t,n){void 0===n&&(n=qr);const o=(0,Br._q)(t),r=(0,Br.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,r),()=>t.disconnect()}),[e,o,r])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),r())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const Fr={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function $r(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:o,getTokenProps:r}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const a=o({line:t,className:(0,i.A)(n,s&&Fr.codeLine)}),c=t.map(((e,t)=>(0,x.jsx)("span",{...r({token:e,key:t})},t)));return(0,x.jsxs)("span",{...a,children:[s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("span",{className:Fr.codeLineNumber}),(0,x.jsx)("span",{className:Fr.codeLineContent,children:c})]}):c,(0,x.jsx)("br",{})]})}function Kr(e){return(0,x.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,x.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Hr(e){return(0,x.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,x.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Vr={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Ur(e){let{code:t,className:n}=e;const[o,r]=(0,s.useState)(!1),a=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),o=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const r=document.getSelection(),i=r.rangeCount>0&&r.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let a=!1;try{a=document.execCommand("copy")}catch{}s.remove(),i&&(r.removeAllRanges(),r.addRange(i)),o&&o.focus()}(t),r(!0),a.current=window.setTimeout((()=>{r(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(a.current)),[]),(0,x.jsx)("button",{type:"button","aria-label":o?(0,rr.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,rr.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,rr.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.A)("clean-btn",n,Vr.copyButton,o&&Vr.copyButtonCopied),onClick:c,children:(0,x.jsxs)("span",{className:Vr.copyButtonIcons,"aria-hidden":"true",children:[(0,x.jsx)(Kr,{className:Vr.copyButtonIcon}),(0,x.jsx)(Hr,{className:Vr.copyButtonSuccessIcon})]})})}function Wr(e){return(0,x.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,x.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const zr={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Gr(e){let{className:t,onClick:n,isEnabled:s}=e;const o=(0,rr.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,x.jsx)("button",{type:"button",onClick:n,className:(0,i.A)("clean-btn",t,s&&zr.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,x.jsx)(Wr,{className:zr.wordWrapButtonIcon,"aria-hidden":"true"})})}function Xr(e){let{children:t,className:n="",metastring:o,title:r,showLineNumbers:a,language:l}=e;const{prism:{defaultLanguage:u,magicComments:h}}=(0,ur.p)(),p=function(e){return e?.toLowerCase()}(l??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??u),d=hr(),f=function(){const[e,t]=(0,s.useState)(!1),[n,o]=(0,s.useState)(!1),r=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=r.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[r,e]),a=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=r.current,n=e>t||r.current.querySelector("code").hasAttribute("style");o(n)}),[r]);return Mr(r,a),(0,s.useEffect)((()=>{a()}),[e,a]),(0,s.useEffect)((()=>(window.addEventListener("resize",a,{passive:!0}),()=>{window.removeEventListener("resize",a)})),[a]),{codeBlockRef:r,isEnabled:e,isCodeScrollable:n,toggle:i}}(),m=function(e){return e?.match(Cr)?.groups.title??""}(o)||r,{lineClassNames:k,code:g}=Rr(t,{metastring:o,language:p,magicComments:h}),_=a??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return(0,x.jsxs)(Or,{as:"div",className:(0,i.A)(n,p&&!n.includes(`language-${p}`)&&`language-${p}`),children:[m&&(0,x.jsx)("div",{className:Dr.codeBlockTitle,children:m}),(0,x.jsxs)("div",{className:Dr.codeBlockContent,children:[(0,x.jsx)(c.f4,{theme:d,code:g,language:p??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:o,getTokenProps:r}=e;return(0,x.jsx)("pre",{tabIndex:0,ref:f.codeBlockRef,className:(0,i.A)(t,Dr.codeBlock,"thin-scrollbar"),style:n,children:(0,x.jsx)("code",{className:(0,i.A)(Dr.codeBlockLines,_&&Dr.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,x.jsx)($r,{line:e,getLineProps:o,getTokenProps:r,classNames:k[t],showLineNumbers:_},t)))})})}}),(0,x.jsxs)("div",{className:Dr.buttonGroup,children:[(f.isEnabled||f.isCodeScrollable)&&(0,x.jsx)(Gr,{className:Dr.codeButton,onClick:()=>f.toggle(),isEnabled:f.isEnabled}),(0,x.jsx)(Ur,{className:Dr.codeButton,code:g})]})]})]})}const Jr=(Yr=function(e){let{children:t,...n}=e;const o=(0,a.A)(),r=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),i="string"==typeof r?Xr:Pr;return(0,x.jsx)(i,{...n,children:r},String(o))},function(e){return e.live?(0,x.jsx)(Tr,{scope:br,...e}):(0,x.jsx)(Yr,{...e})});var Yr;function Qr(e){return(0,x.jsx)("code",{...e})}var Zr=n(8774);var ei=n(3427),ti=n(1422);const ni={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function si(e){return!!e&&("SUMMARY"===e.tagName||si(e.parentElement))}function oi(e,t){return!!e&&(e===t||oi(e.parentElement,t))}function ri(e){let{summary:t,children:n,...o}=e;(0,ei.A)().collectAnchor(o.id);const r=(0,a.A)(),c=(0,s.useRef)(null),{collapsed:l,setCollapsed:u}=(0,ti.u)({initialState:!o.open}),[h,p]=(0,s.useState)(o.open),d=s.isValidElement(t)?t:(0,x.jsx)("summary",{children:t??"Details"});return(0,x.jsxs)("details",{...o,ref:c,open:h,"data-collapsed":l,className:(0,i.A)(ni.details,r&&ni.isBrowser,o.className),onMouseDown:e=>{si(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;si(t)&&oi(t,c.current)&&(e.preventDefault(),l?(u(!1),p(!0)):u(!0))},children:[d,(0,x.jsx)(ti.N,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{u(e),p(!e)},children:(0,x.jsx)("div",{className:ni.collapsibleContent,children:n})})]})}const ii={details:"details_b_Ee"},ai="alert alert--info";function ci(e){let{...t}=e;return(0,x.jsx)(ri,{...t,className:(0,i.A)(ai,ii.details,t.className)})}function li(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),o=(0,x.jsx)(x.Fragment,{children:t.filter((e=>e!==n))});return(0,x.jsx)(ci,{...e,summary:n,children:o})}var ui=n(1107);function hi(e){return(0,x.jsx)(ui.A,{...e})}const pi={containsTaskList:"containsTaskList_mC6p"};function di(e){if(void 0!==e)return(0,i.A)(e,e?.includes("contains-task-list")&&pi.containsTaskList)}const fi={img:"img_ev3q"};var mi=n(7293);const ki={Head:r.A,details:li,Details:li,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,x.jsx)(Qr,{...e}):(0,x.jsx)(Jr,{...e})},a:function(e){return(0,x.jsx)(Zr.A,{...e})},pre:function(e){return(0,x.jsx)(x.Fragment,{children:e.children})},ul:function(e){return(0,x.jsx)("ul",{...e,className:di(e.className)})},li:function(e){return(0,ei.A)().collectAnchor(e.id),(0,x.jsx)("li",{...e})},img:function(e){return(0,x.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,i.A)(t,fi.img))});var t},h1:e=>(0,x.jsx)(hi,{as:"h1",...e}),h2:e=>(0,x.jsx)(hi,{as:"h2",...e}),h3:e=>(0,x.jsx)(hi,{as:"h3",...e}),h4:e=>(0,x.jsx)(hi,{as:"h4",...e}),h5:e=>(0,x.jsx)(hi,{as:"h5",...e}),h6:e=>(0,x.jsx)(hi,{as:"h6",...e}),admonition:mi.A,mermaid:()=>null};function gi(e){let{children:t}=e;return(0,x.jsx)(o.x,{components:ki,children:t})}},89:(e,t)=>{"use strict";var n="\n",s=function(){function e(e){this.string=e;for(var t=[0],s=0;s this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()},8426:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,o,r]=t;if(s&&r){s=parseInt(s),r=parseInt(r);const e=s 0&&s.push(o+" more"),n._failMsg="is none of "+s.join(", ")):n._failMsg="is none of "+o+" types",n}return o(t,e),t.prototype.getChecker=function(e,t){var n=this,s=this.ttypes.map((function(n){return n.getChecker(e,t)}));return function(e,t){for(var o=t.unionResolver(),r=0;r =s._score)&&(s=i)}s&&s._score>0&&((t=this._propNames).push.apply(t,s._propNames),(n=this._messages).push.apply(n,s._messages))},e.prototype.getError=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var s=this._propNames[n];e+="number"==typeof s?"["+s+"]":s?"."+s:"";var r=this._messages[n];r&&t.push(e+" "+r)}return new o(e,t.join("; "))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var s=this._propNames[n];e+="number"==typeof s?"["+s+"]":s?"."+s:"";var o=this._messages[n];o&&t.push({path:e,message:o})}var r=null;for(n=t.length-1;n>=0;n--)r&&(t[n].nested=[r]),r=t[n];return r},e}();t.DetailContext=i;var a=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new i;return this.contexts.push(e),e},e}()},8453:(e,t,n)=>{"use strict";n.d(t,{R:()=>i,x:()=>a});var s=n(6540);const o={},r=s.createContext(o);function i(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/38b2e376.3d83e140.js b/assets/js/38b2e376.3d83e140.js new file mode 100644 index 00000000..26eb2a21 --- /dev/null +++ b/assets/js/38b2e376.3d83e140.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5521],{6036:e=>{e.exports=JSON.parse('{"permalink":"/bpd-reference/blog/tags/facebook","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}')}}]); \ No newline at end of file diff --git a/assets/js/3b87ebee.65aa3284.js b/assets/js/3b87ebee.65aa3284.js new file mode 100644 index 00000000..b8ac40b2 --- /dev/null +++ b/assets/js/3b87ebee.65aa3284.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9316],{2386:e=>{e.exports=JSON.parse('{"label":"functions","permalink":"/bpd-reference/docs/tags/functions","allTagsPath":"/bpd-reference/docs/tags","count":2,"items":[{"id":"statistical-inference/hypothesis_test","title":"Hypothesis Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/hypothesis_test"},{"id":"statistical-inference/permutation_test","title":"Permutation Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/permutation_test"}],"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/3f791b14.1dbf70e4.js b/assets/js/3f791b14.1dbf70e4.js deleted file mode 100644 index f682cc1b..00000000 --- a/assets/js/3f791b14.1dbf70e4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6090],{9016:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var t=s(4848),i=s(8453),r=s(8597);s(8205);const o={sidebar_position:1,description:"Conditionally execute code. The elif and else blocks are optional."},a=void 0,c={id:"documentation/if-statements/if-elif-else",title:"if-elif-else",description:"Conditionally execute code. The elif and else blocks are optional.",source:"@site/docs/documentation/if-statements/if-elif-else.md",sourceDirName:"documentation/if-statements",slug:"/documentation/if-statements/if-elif-else",permalink:"/bpd-reference/docs/documentation/if-statements/if-elif-else",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/if-statements/if-elif-else.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,description:"Conditionally execute code. The elif and else blocks are optional."},sidebar:"docsSidebar",previous:{title:"if-statements",permalink:"/bpd-reference/docs/category/if-statements"},next:{title:"in \u2044 not in",permalink:"/bpd-reference/docs/documentation/if-statements/in \u2044 not in"}},d={},l=[];function p(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsxs)("code",{children:["if : ",(0,t.jsx)("br",{})," "]}),"\r\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsxs)("code",{children:[" ",(0,t.jsx)("br",{})," "]}),"\r\n",(0,t.jsxs)("code",{children:[" elif : ",(0,t.jsx)("br",{})," "]}),"\r\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsxs)("code",{children:[" ",(0,t.jsx)("br",{})," "]}),"\r\n",(0,t.jsxs)("code",{children:[" elif : ",(0,t.jsx)("br",{})," "]}),"\r\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsxs)("code",{children:[" ",(0,t.jsx)("br",{})," "]}),"\r\n",(0,t.jsxs)("code",{children:[" ... ",(0,t.jsx)("br",{})," "]}),"\r\n",(0,t.jsxs)("code",{children:[" else: ",(0,t.jsx)("br",{})," "]}),"\r\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsx)("code",{children:" "})]}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Conditionally execute code. The elif and else blocks are optional."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Components:"}),(0,t.jsx)("dd",{className:"parameter",children:"if :"}),(0,t.jsx)("dd",{className:"parameter-description",children:"If the condition is True, the body of the if statement is executed. Condition will be checked even if\r\nanother if condition is fulfilled. "}),(0,t.jsx)("dd",{className:"parameter",children:"elif :"}),(0,t.jsx)("dd",{className:"parameter-description",children:"If the if condition is False, code moves onto the elif statement and checks the condition. If an if statement was executed, the elif conditions will not be checked."}),(0,t.jsx)("dd",{className:"parameter",children:"else :"}),(0,t.jsx)("dd",{className:"parameter-description",children:"If none of the if and elif conditions are met, the else body will execute. "})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets = bpd.read_csv('pets.csv')\r\npets\n"})}),"\n",(0,t.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0],["cat_001","cat","golden",1.5,0.2],["cat_002","cat","black",15.0,9.0],["dog_002","dog","white",80.0,2.0],["dog_003","dog","black",25.0,0.5],["ham_001","hamster","black",1.0,3.0],["ham_002","hamster","golden",0.25,0.2],["cat_003","cat","black",10.0,0.0]]}'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def more_descriptive_name(id_str, species, color, weight, age):\r\n return id_str + ': This ' + color + ' ' + species + ' weighs ' + weight + ' lbs and is ' + age + ' years old'\r\n \r\ndef cat_and_dog_info(pet_id):\r\n id_arr = np.array(pets.get('ID'))\r\n if pet_id not in id_arr:\r\n return 'This pet is not in our record'\r\n pets_info = pets[pets.get('ID') == pet_id]\r\n age = pets_info.get('Age').iloc[0]\r\n weight = pets_info.get('Weight').iloc[0]\r\n species = pets_info.get('Species').iloc[0]\r\n color = pets_info.get('Color').iloc[0]\r\n if (species == 'dog') and (age < 1.5):\r\n return pet_id + ': This is a puppy \ud83d\udc36'\r\n elif (species == 'cat') and (age < 1):\r\n return pet_id + ': This is a kitten \ud83d\udc31'\r\n elif (species == 'dog') or (species == 'cat'):\r\n weight = str(weight)\r\n age = str(age)\r\n return more_descriptive_name(pet_id, species, color, weight, age)\r\n \r\n else:\r\n return pet_id + ': This pet is not a dog or a cat'\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"cat_and_dog_info('dog_001')\n"})}),"\n",(0,t.jsx)(n.p,{children:"'dog_001: This black dog weighs 40.0 lbs and is 5.0 years old'"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"cat_and_dog_info('cat_001')\n"})}),"\n",(0,t.jsx)(n.p,{children:"'cat_001: This is a kitten \ud83d\udc31'"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"cat_and_dog_info('cat_009')\n"})}),"\n",(0,t.jsx)(n.p,{children:"'This pet is not in our record'"})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,n,s)=>{s.d(n,{A:()=>i});s(6540);var t=s(4848);const i=e=>{let{data:n}=e,s=[],i=[],r="",o=[];if(n){const e=JSON.parse(n);s=e.columns||[],i=e.data||[],r=e.indexName||"Index",o=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:r}),s.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:i.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:o[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(s=e,"boolean"==typeof s?s.toString().charAt(0).toUpperCase()+s.toString().slice(1):s)},n);var s}))]},n)))})]})})}},8205:(e,n,s)=>{s.d(n,{A:()=>i});s(6540);var t=s(4848);const i=e=>{let{data:n}=e,s=[],i=[],r="",o="";if(n)try{const e=JSON.parse(n);r=e.name||"",o=e.dtype||"Unknown type",s=e.index||[],i=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const a=i.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:a.map(((e,n)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:s[n]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",o]})]})}},8453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var t=s(6540);const i={},r=t.createContext(i);function o(e){const n=t.useContext(r);return t.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(i):e.components||i:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3f791b14.fee676c1.js b/assets/js/3f791b14.fee676c1.js new file mode 100644 index 00000000..ddf64788 --- /dev/null +++ b/assets/js/3f791b14.fee676c1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6090],{9016:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var t=s(4848),i=s(8453),o=s(8597);s(8205);const a={sidebar_position:1,description:"Conditionally execute code. The elif and else blocks are optional."},c=void 0,r={id:"documentation/if-statements/if-elif-else",title:"if-elif-else",description:"Conditionally execute code. The elif and else blocks are optional.",source:"@site/docs/documentation/if-statements/if-elif-else.md",sourceDirName:"documentation/if-statements",slug:"/documentation/if-statements/if-elif-else",permalink:"/bpd-reference/docs/documentation/if-statements/if-elif-else",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/if-statements/if-elif-else.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,description:"Conditionally execute code. The elif and else blocks are optional."},sidebar:"docsSidebar",previous:{title:"if-statements",permalink:"/bpd-reference/docs/category/if-statements"},next:{title:"in \u2044 not in",permalink:"/bpd-reference/docs/documentation/if-statements/in \u2044 not in"}},d={},l=[];function p(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsxs)("code",{children:["if : ",(0,t.jsx)("br",{})," "]}),"\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsxs)("code",{children:[" ",(0,t.jsx)("br",{})," "]}),"\n",(0,t.jsxs)("code",{children:[" elif : ",(0,t.jsx)("br",{})," "]}),"\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsxs)("code",{children:[" ",(0,t.jsx)("br",{})," "]}),"\n",(0,t.jsxs)("code",{children:[" elif : ",(0,t.jsx)("br",{})," "]}),"\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsxs)("code",{children:[" ",(0,t.jsx)("br",{})," "]}),"\n",(0,t.jsxs)("code",{children:[" ... ",(0,t.jsx)("br",{})," "]}),"\n",(0,t.jsxs)("code",{children:[" else: ",(0,t.jsx)("br",{})," "]}),"\n\xa0\xa0\xa0\xa0\xa0\xa0 ",(0,t.jsx)("code",{children:" "})]}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Conditionally execute code. The elif and else blocks are optional."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Components:"}),(0,t.jsx)("dd",{className:"parameter",children:"if :"}),(0,t.jsx)("dd",{className:"parameter-description",children:"If the condition is True, the body of the if statement is executed. Condition will be checked even if\nanother if condition is fulfilled. "}),(0,t.jsx)("dd",{className:"parameter",children:"elif :"}),(0,t.jsx)("dd",{className:"parameter-description",children:"If the if condition is False, code moves onto the elif statement and checks the condition. If an if statement was executed, the elif conditions will not be checked."}),(0,t.jsx)("dd",{className:"parameter",children:"else :"}),(0,t.jsx)("dd",{className:"parameter-description",children:"If none of the if and elif conditions are met, the else body will execute. "})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets = bpd.read_csv('pets.csv')\npets\n"})}),"\n",(0,t.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0],["cat_001","cat","golden",1.5,0.2],["cat_002","cat","black",15.0,9.0],["dog_002","dog","white",80.0,2.0],["dog_003","dog","black",25.0,0.5],["ham_001","hamster","black",1.0,3.0],["ham_002","hamster","golden",0.25,0.2],["cat_003","cat","black",10.0,0.0]]}'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def more_descriptive_name(id_str, species, color, weight, age):\n return id_str + ': This ' + color + ' ' + species + ' weighs ' + weight + ' lbs and is ' + age + ' years old'\n \ndef cat_and_dog_info(pet_id):\n id_arr = np.array(pets.get('ID'))\n if pet_id not in id_arr:\n return 'This pet is not in our record'\n pets_info = pets[pets.get('ID') == pet_id]\n age = pets_info.get('Age').iloc[0]\n weight = pets_info.get('Weight').iloc[0]\n species = pets_info.get('Species').iloc[0]\n color = pets_info.get('Color').iloc[0]\n if (species == 'dog') and (age < 1.5):\n return pet_id + ': This is a puppy \ud83d\udc36'\n elif (species == 'cat') and (age < 1):\n return pet_id + ': This is a kitten \ud83d\udc31'\n elif (species == 'dog') or (species == 'cat'):\n weight = str(weight)\n age = str(age)\n return more_descriptive_name(pet_id, species, color, weight, age)\n \n else:\n return pet_id + ': This pet is not a dog or a cat'\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"cat_and_dog_info('dog_001')\n"})}),"\n",(0,t.jsx)(n.p,{children:"'dog_001: This black dog weighs 40.0 lbs and is 5.0 years old'"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"cat_and_dog_info('cat_001')\n"})}),"\n",(0,t.jsx)(n.p,{children:"'cat_001: This is a kitten \ud83d\udc31'"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"cat_and_dog_info('cat_009')\n"})}),"\n",(0,t.jsx)(n.p,{children:"'This pet is not in our record'"})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,n,s)=>{s.d(n,{A:()=>i});s(6540);var t=s(4848);const i=e=>{let{data:n}=e,s=[],i=[],o="",a=[];if(n){const e=JSON.parse(n);s=e.columns||[],i=e.data||[],o=e.indexName||"Index",a=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:o}),s.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:i.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:a[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(s=e,"boolean"==typeof s?s.toString().charAt(0).toUpperCase()+s.toString().slice(1):s)},n);var s}))]},n)))})]})})}},8205:(e,n,s)=>{s.d(n,{A:()=>i});s(6540);var t=s(4848);const i=e=>{let{data:n}=e,s=[],i=[],o="",a="";if(n)try{const e=JSON.parse(n);o=e.name||"",a=e.dtype||"Unknown type",s=e.index||[],i=e.data||[]}catch(r){console.error("Error parsing data prop in SeriesComponent:",r)}const c=i.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:c.map(((e,n)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:s[n]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",o,", dtype: ",a]})]})}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>c});var t=s(6540);const i={},o=t.createContext(i);function a(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/46ccc97a.8eb8150e.js b/assets/js/46ccc97a.8eb8150e.js deleted file mode 100644 index 969ccef4..00000000 --- a/assets/js/46ccc97a.8eb8150e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5579],{6314:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var t=n(4848),r=n(8453),a=(n(8597),n(8205));const i={sidebar_position:5},o=void 0,c={id:"documentation/series-methods/ser.mean()",title:"ser.mean()",description:"ser.mean()",source:"@site/docs/documentation/series-methods/ser.mean().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.mean()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.mean()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.mean().md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"ser.sum()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.sum()"},next:{title:"ser.median()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.median()"}},d={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.mean()"}),"\n",(0,t.jsx)("div",{className:"base",children:(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the mean of the values in the Series."})})}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\r\nweight_ser\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser.mean()\n"})}),"\n",(0,t.jsx)(s.p,{children:"21.59375"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],a=e.indexName||"Index",i=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:a}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>o});var t=n(6540);const r={},a=t.createContext(r);function i(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/46ccc97a.c2d0e88e.js b/assets/js/46ccc97a.c2d0e88e.js new file mode 100644 index 00000000..553699de --- /dev/null +++ b/assets/js/46ccc97a.c2d0e88e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5579],{6314:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var t=n(4848),r=n(8453),a=(n(8597),n(8205));const i={sidebar_position:5},o=void 0,c={id:"documentation/series-methods/ser.mean()",title:"ser.mean()",description:"ser.mean()",source:"@site/docs/documentation/series-methods/ser.mean().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.mean()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.mean()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.mean().md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"ser.sum()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.sum()"},next:{title:"ser.median()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.median()"}},d={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.mean()"}),"\n",(0,t.jsx)("div",{className:"base",children:(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the mean of the values in the Series."})})}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\nweight_ser\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser.mean()\n"})}),"\n",(0,t.jsx)(s.p,{children:"21.59375"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],a=e.indexName||"Index",i=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:a}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>o});var t=n(6540);const r={},a=t.createContext(r);function i(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/499d47b2.394129d8.js b/assets/js/499d47b2.394129d8.js new file mode 100644 index 00000000..ce8f7319 --- /dev/null +++ b/assets/js/499d47b2.394129d8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2302],{3331:(A,e,t)=>{t.r(e),t.d(e,{assets:()=>w,contentTitle:()=>C,default:()=>i,frontMatter:()=>n,metadata:()=>c,toc:()=>l});var a=t(4848),r=t(8453),s=t(8597);t(8205);const n={sidebar_position:3},C=void 0,c={id:"documentation/plotting/Bar Plot",title:"Bar Plot",description:"df.plot(kind='bar', x=datacol, y=datacol)",source:"@site/docs/documentation/plotting/Bar Plot.md",sourceDirName:"documentation/plotting",slug:"/documentation/plotting/Bar Plot",permalink:"/bpd-reference/docs/documentation/plotting/Bar Plot",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/plotting/Bar Plot.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"Scatter Plot",permalink:"/bpd-reference/docs/documentation/plotting/Scatter Plot"},next:{title:"Line Plot",permalink:"/bpd-reference/docs/documentation/plotting/Line Plot"}},w={},l=[];function d(A){const e={a:"a",code:"code",hr:"hr",img:"img",p:"p",pre:"pre",...(0,r.R)(),...A.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"df.plot(kind='bar', x=data_col, y=data_col)"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Create a bar plot using a DataFrame."})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["kind : ",(0,a.jsx)("em",{children:"string"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"To create a bar plot, use kind='bar'"}),(0,a.jsxs)("dd",{className:"parameter-description",children:["To create a ",(0,a.jsx)("em",{children:"horizontal"})," bar plot, use kind='barh'"]}),(0,a.jsxs)("dd",{className:"parameter",children:["x : ",(0,a.jsx)("em",{children:"label, optional"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column containing categorical data for group labels. If not specified, the index of the DataFrame is used."}),(0,a.jsxs)("dd",{className:"parameter",children:["y : ",(0,a.jsx)("em",{children:"label, optional"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column containing numerical data for the groups in x. If not specified, all numerical columns are used."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsxs)("dd",{children:["plot - Matplotlib plot created using ",(0,a.jsx)(e.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html",children:"parameters"}),"."]}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"Matplotlib plot"}),(0,a.jsx)("dt",{className:"term",children:"Note:"}),(0,a.jsx)("dd",{children:(0,a.jsxs)("ul",{children:[(0,a.jsxs)("li",{children:["When kind='bar', you can sort your DataFrame in ",(0,a.jsx)("em",{children:"descending"})," order by your y column before plotting to create a ",(0,a.jsx)("em",{children:"vertical"})," bar plot that goes from tall to short from left to right."]}),(0,a.jsxs)("li",{children:["When kind='barh', you can sort your DataFrame in ",(0,a.jsx)("em",{children:"ascending"})," order by your y column before plotting to create a ",(0,a.jsx)("em",{children:"horizontal"})," bar plot that goes from tall to short from top to bottom."]})]})})]})]}),"\n",(0,a.jsx)(e.hr,{}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"# Creating a DataFrame to use for bar plots below\navg_species_weights = pets.get(['Species', 'Weight']).groupby('Species').mean().reset_index()\navg_species_weights\n"})}),"\n",(0,a.jsx)(s.A,{data:'{"columns":["Species","Weight"],"index":[0,1,2],"data":[["cat",8.8333333333],["dog",48.3333333333],["hamster",0.625]]}'}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"avg_species_weights.sort_values(by='Weight', ascending=False).plot(kind='bar', x='Species', y='Weight')\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 1",src:t(8684).A+"",width:"543",height:"476"})}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"If the group label is the index of the DataFrame, the x parameter can be omitted."})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"# Creating a DataFrame to use for bar plots below\nspecies_count = pets.get(['Species','ID']).groupby('Species').count()\nspecies_count = species_count.assign(Count = species_count.get('ID')).drop(columns = ['ID'])\nspecies_count\n"})}),"\n",(0,a.jsx)(s.A,{data:'{"columns":["Count"],"index":["cat","dog","hamster"],"data":[[3],[3],[2]]}'}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"species_count.plot(kind='bar', y='Count', title='Distribution of Species');\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 2",src:t(8846).A+"",width:"640",height:"480"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"avg_species_weights.sort_values(by='Weight', ascending=True).plot(kind='barh', x='Species', y='Weight')\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 3",src:t(1335).A+"",width:"604",height:"413"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"pets.groupby('Species').count().plot(kind='bar', y='ID', title='Distribution of Species')\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 3",src:t(1937).A+"",width:"547",height:"496"})})]})}function i(A={}){const{wrapper:e}={...(0,r.R)(),...A.components};return e?(0,a.jsx)(e,{...A,children:(0,a.jsx)(d,{...A})}):d(A)}},8597:(A,e,t)=>{t.d(e,{A:()=>r});t(6540);var a=t(4848);const r=A=>{let{data:e}=A,t=[],r=[],s="",n=[];if(e){const A=JSON.parse(e);t=A.columns||[],r=A.data||[],s=A.indexName||"Index",n=A.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:s}),t.map(((A,e)=>(0,a.jsx)("th",{children:A},e)))]})}),(0,a.jsx)("tbody",{children:r.map(((A,e)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:n[e]}),A.map(((A,e)=>{return(0,a.jsx)("td",{children:(t=A,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},e);var t}))]},e)))})]})})}},8205:(A,e,t)=>{t.d(e,{A:()=>r});t(6540);var a=t(4848);const r=A=>{let{data:e}=A,t=[],r=[],s="",n="";if(e)try{const A=JSON.parse(e);s=A.name||"",n=A.dtype||"Unknown type",t=A.index||[],r=A.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const C=r.map((A=>JSON.stringify(A)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:C.map(((A,e)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:t[e]}),(0,a.jsx)("span",{className:"series-value",children:"true"===A||"false"===A?A.charAt(0).toUpperCase()+A.slice(1):A})]},e)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",s,", dtype: ",n]})]})}},8684:(A,e,t)=>{t.d(e,{A:()=>a});const a=t.p+"assets/images/barex1-21e546e39652d57da5a66250931ada7d.png"},1335:(A,e,t)=>{t.d(e,{A:()=>a});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r4uJipaSkyOl0atKkSTpx4oTS09N9PScAAECl5dURrmHDhqlTp046fPiwatWq5d5+xx13aNmyZT4bDgAAoCrw6gjXypUrlZOTo8DAQI/tzZo1048//uiTwQAAAKoKr45wuVwulZaWltn+ww8/yOl0XvZQAAAAVYlXwZWSkqLXX3/dfd3hcOjo0aNKS0tT7969fTUbAABAleDVS4qvvfaakpOT1apVK504cUL33Xef8vPz1aBBA82ePdvXMwIAAFRqXgVXZGSk8vLyNHv2bG3YsEEul0uDBw/WgAEDPE6iBwAAgJfBJUm1atXSoEGDNGjQIF/OAwAAUOVcdHAtWLBAvXr1UkBAgBYsWHDB2575MmsAAABcQnD169dPBw4cUKNGjdSvX7/z3s7hcJzzHYwAAADV1UUHl8vlOud/AwAA4MK8/i5FAAAAXByvguvJJ5/UlClTymyfOnWqUlNTL3emSmn06NFq37693WMAAIAKyKvgmjdvnm688cYy22+44QZ98sknlz0UAABAVeJVcP3yyy8KCwsrsz00NFSHDh267KHs4nK5NHHiRMXFxSkoKEhNmzbVyy+/LEl67rnnFB8fr+DgYDVv3lwvvPCCTp06JUmaPn26xowZo2+++UYOh0MOh0PTp0+38ZEAAICKxKvP4YqLi9PixYs1dOhQj+2LFi1S8+bNfTKYHUaNGqX33ntPr732mrp06aKCggJ99913kiSn06np06crMjJSmzdv1iOPPCKn06kRI0aof//+2rJlixYvXqylS5dK0jmDVJKKi4tVXFzsvl5YWGj+gQEAAFt5FVzDhw/X0KFD9fPPP+vmm2+WJC1btkyvvvqqx3csViZFRUV64403NHXqVD3wwAOSpNjYWHXp0kWS9Ne//tV92+joaD399NP66KOPNGLECNWqVUshISHy9/dXRETEBX/P+PHjNWbMGHMPBAAAVDheBdegQYNUXFysl19+WS+99JKk0xEybdo0DRw40KcDlpdt27apuLhYt9xyyzn3f/LJJ3r99df1n//8R0ePHlVJSYlCQ0Mv+feMGjVKw4cPd18vLCxUVFSU13MDAICKz+uv9hkyZIiGDBmin3/+2X2EpzK70HdArl69Wvfcc4/GjB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GcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhGcAEAABhma3AlJSUpNTXVzhEAAACM4wjXWYhAAADgawSXISdPnrR7BAAAUEHYHlwul0sjRoxQvXr1FBERodGjR7v3TZ48WW3atFHt2rUVFRWlP//5zzp69Kh7//Tp01WnTh19/vnnSkhIUHBwsO666y4dO3ZMGRkZio6OVt26dfXEE0+otLTU/XNvv/22WrRooZo1ayo8PFx33XWXJOnBBx/UihUr9MYbb8jhcMjhcGj37t2SpG+//Va9e/dWSEiIwsPDdf/99+vQoUPu+0xKStLQoUM1fPhwNWjQQCkpKWafOAAAUGnYHlwZGRmqXbu21qxZo0mTJmns2LFasmSJJMnPz09TpkzRli1blJGRoeXLl2vEiBEeP3/8+HFNmTJFc+bM0eLFi5WVlaU777xTCxcu1MKFCzVz5ky9++67+uSTTyRJ69ev15NPPqmxY8dq+/btWrx4sbp27SpJeuONN9S5c2c98sgjKigoUEFBgaKiolRQUKDExES1b99e69ev1+LFi/XTTz/pj3/8Y5nH4u/vr5ycHL3zzjvnfLzFxcUqLCz0uAAAgKrN3+4B2rZtq7S0NElSixYtNHXqVC1btkwpKSke51LFxMTopZde0pAhQ/T222+7t586dUrTpk1TbGysJOmuu+7SzJkz9dNPPykkJEStWrVScnKyMjMz1b9/f+3du1e1a9fWrbfeKqfTqWbNmunqq6+WJIWFhSkwMFDBwcGKiIhw/45p06apQ4cO+tvf/ube9sEHHygqKkrff/+94uPjJUlxcXGaNGnSBR/v+PHjNWbMmMt70gAAQKVi+xGutm3belxv3LixDh48KEnKzMxUSkqKrrjiCjmdTg0cOFC//PKLjh075r59cHCwO7YkKTw8XNHR0QoJCfHYduY+U1JS1KxZMzVv3lz333+/Zs2apePHj19wxtzcXGVmZiokJMR9admypSRpx44d7tt16tTpdx/vqFGjdOTIEfdl3759v/szAACgcrM9uAICAjyuOxwOuVwu7dmzR71791br1q01b9485ebm6q233pJ0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Lly9XTEyMx37Wwh6WZam4uJjnvxzdcsst2rx5s/Ly8tyXTp06acCAAcrLy1Pz5s1ZCxsUFxdr27Ztaty4sW//PXhxQj98YM6cOVZAQID1/vvvW99++62Vmppq1a5d29q9e7fdo1VZRUVF1saNG62NGzdakqzJkydbGzdutPbs2WNZlmVNmDDBCgsLs+bPn29t3rzZuvfee63GjRtbhYWFNk9etQwZMsQKCwuzsrKyrIKCAvfl+PHj7tuwFmaNGjXK+uqrr6xdu3ZZmzZtsv7yl79Yfn5+1pdffmlZFs+/nf73XYqWxVqUh6efftrKysqydu7caa1evdq69dZbLafT6f577Ks1ILhs9NZbb1nNmjWzAgMDrQ4dOrjfFg8zMjMzLUllLg888IBlWaff/puWlmZFRERYQUFBVteuXa3NmzfbO3QVdK41kGR9+OGH7tuwFmYNGjTI/b89DRs2tG655RZ3bFkWz7+dzg4u1sK8/v37W40bN7YCAgKsyMhI684777S2bt3q3u+rNXBYlmX54AgcAAAAzoNzuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAz7PyJauZFJ+x/AAAAAAElFTkSuQmCC"},8846:(A,e,t)=>{t.d(e,{A:()=>a});const a=t.p+"assets/images/barex3-10f7f96ec4c5c233666af459ad98447d.png"},1937:(A,e,t)=>{t.d(e,{A:()=>a});const a=t.p+"assets/images/barex4-243bfdca4b1a1d8f6fdc72a0cd9af62e.png"},8453:(A,e,t)=>{t.d(e,{R:()=>n,x:()=>C});var a=t(6540);const r={},s=a.createContext(r);function n(A){const e=a.useContext(s);return a.useMemo((function(){return"function"==typeof A?A(e):{...e,...A}}),[e,A])}function C(A){let e;return e=A.disableParentContext?"function"==typeof A.components?A.components(r):A.components||r:n(A.components),a.createElement(s.Provider,{value:e},A.children)}}}]); \ No newline at end of file diff --git a/assets/js/499d47b2.3ce4635e.js b/assets/js/499d47b2.3ce4635e.js deleted file mode 100644 index 4dceebe3..00000000 --- a/assets/js/499d47b2.3ce4635e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2302],{3331:(A,e,t)=>{t.r(e),t.d(e,{assets:()=>w,contentTitle:()=>C,default:()=>i,frontMatter:()=>n,metadata:()=>c,toc:()=>l});var a=t(4848),r=t(8453),s=t(8597);t(8205);const n={sidebar_position:3},C=void 0,c={id:"documentation/plotting/Bar Plot",title:"Bar Plot",description:"df.plot(kind='bar', x=datacol, y=datacol)",source:"@site/docs/documentation/plotting/Bar Plot.md",sourceDirName:"documentation/plotting",slug:"/documentation/plotting/Bar Plot",permalink:"/bpd-reference/docs/documentation/plotting/Bar Plot",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/plotting/Bar Plot.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"Scatter Plot",permalink:"/bpd-reference/docs/documentation/plotting/Scatter Plot"},next:{title:"Line Plot",permalink:"/bpd-reference/docs/documentation/plotting/Line Plot"}},w={},l=[];function d(A){const e={a:"a",code:"code",hr:"hr",img:"img",p:"p",pre:"pre",...(0,r.R)(),...A.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"df.plot(kind='bar', x=data_col, y=data_col)"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Create a bar plot using a DataFrame."})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["kind : ",(0,a.jsx)("em",{children:"string"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"To create a bar plot, use kind='bar'"}),(0,a.jsxs)("dd",{className:"parameter-description",children:["To create a ",(0,a.jsx)("em",{children:"horizontal"})," bar plot, use kind='barh'"]}),(0,a.jsxs)("dd",{className:"parameter",children:["x : ",(0,a.jsx)("em",{children:"label, optional"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column containing categorical data for group labels. If not specified, the index of the DataFrame is used."}),(0,a.jsxs)("dd",{className:"parameter",children:["y : ",(0,a.jsx)("em",{children:"label, optional"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column containing numerical data for the groups in x. If not specified, all numerical columns are used."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsxs)("dd",{children:["plot - Matplotlib plot created using ",(0,a.jsx)(e.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html",children:"parameters"}),"."]}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"Matplotlib plot"}),(0,a.jsx)("dt",{className:"term",children:"Note:"}),(0,a.jsx)("dd",{children:(0,a.jsxs)("ul",{children:[(0,a.jsxs)("li",{children:["When kind='bar', you can sort your DataFrame in ",(0,a.jsx)("em",{children:"descending"})," order by your y column before plotting to create a ",(0,a.jsx)("em",{children:"vertical"})," bar plot that goes from tall to short from left to right."]}),(0,a.jsxs)("li",{children:["When kind='barh', you can sort your DataFrame in ",(0,a.jsx)("em",{children:"ascending"})," order by your y column before plotting to create a ",(0,a.jsx)("em",{children:"horizontal"})," bar plot that goes from tall to short from top to bottom."]})]})})]})]}),"\n",(0,a.jsx)(e.hr,{}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"# Creating a DataFrame to use for bar plots below\r\navg_species_weights = pets.get(['Species', 'Weight']).groupby('Species').mean().reset_index()\r\navg_species_weights\n"})}),"\n",(0,a.jsx)(s.A,{data:'{"columns":["Species","Weight"],"index":[0,1,2],"data":[["cat",8.8333333333],["dog",48.3333333333],["hamster",0.625]]}'}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"avg_species_weights.sort_values(by='Weight', ascending=False).plot(kind='bar', x='Species', y='Weight')\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 1",src:t(7191).A+"",width:"543",height:"476"})}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"If the group label is the index of the DataFrame, the x parameter can be omitted."})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"# Creating a DataFrame to use for bar plots below\r\nspecies_count = pets.get(['Species','ID']).groupby('Species').count()\r\nspecies_count = species_count.assign(Count = species_count.get('ID')).drop(columns = ['ID'])\r\nspecies_count\n"})}),"\n",(0,a.jsx)(s.A,{data:'{"columns":["Count"],"index":["cat","dog","hamster"],"data":[[3],[3],[2]]}'}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"species_count.plot(kind='bar', y='Count', title='Distribution of Species');\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 2",src:t(453).A+"",width:"640",height:"480"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"avg_species_weights.sort_values(by='Weight', ascending=True).plot(kind='barh', x='Species', y='Weight')\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 3",src:t(4540).A+"",width:"604",height:"413"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-python",children:"pets.groupby('Species').count().plot(kind='bar', y='ID', title='Distribution of Species')\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"Bar plot example 3",src:t(6682).A+"",width:"547",height:"496"})})]})}function i(A={}){const{wrapper:e}={...(0,r.R)(),...A.components};return e?(0,a.jsx)(e,{...A,children:(0,a.jsx)(d,{...A})}):d(A)}},8597:(A,e,t)=>{t.d(e,{A:()=>r});t(6540);var a=t(4848);const r=A=>{let{data:e}=A,t=[],r=[],s="",n=[];if(e){const A=JSON.parse(e);t=A.columns||[],r=A.data||[],s=A.indexName||"Index",n=A.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:s}),t.map(((A,e)=>(0,a.jsx)("th",{children:A},e)))]})}),(0,a.jsx)("tbody",{children:r.map(((A,e)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:n[e]}),A.map(((A,e)=>{return(0,a.jsx)("td",{children:(t=A,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},e);var t}))]},e)))})]})})}},8205:(A,e,t)=>{t.d(e,{A:()=>r});t(6540);var a=t(4848);const r=A=>{let{data:e}=A,t=[],r=[],s="",n="";if(e)try{const A=JSON.parse(e);s=A.name||"",n=A.dtype||"Unknown type",t=A.index||[],r=A.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const C=r.map((A=>JSON.stringify(A)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:C.map(((A,e)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:t[e]}),(0,a.jsx)("span",{className:"series-value",children:"true"===A||"false"===A?A.charAt(0).toUpperCase()+A.slice(1):A})]},e)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",s,", dtype: ",n]})]})}},7191:(A,e,t)=>{t.d(e,{A:()=>a});const a=t.p+"assets/images/barex1-21e546e39652d57da5a66250931ada7d.png"},4540:(A,e,t)=>{t.d(e,{A:()=>a});const a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlwAAAGdCAYAAADHQK08AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy81sbWrAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAk9klEQVR4nO3de1TUdf7H8dcgF0UGvIMkCoJg5i21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BwsO666y4dO3ZMGRkZio6OVt26dfXEE0+otLTU/XNvv/22WrRooZo1ayo8PFx33XWXJOnBBx/UihUr9MYbb8jhcMjhcGj37t2SpG+//Va9e/dWSEiIwsPDdf/99+vQoUPu+0xKStLQoUM1fPhwNWjQQCkpKWafOAAAUGnYHlwZGRmqXbu21qxZo0mTJmns2LFasmSJJMnPz09TpkzRli1blJGRoeXLl2vEiBEeP3/8+HFNmTJFc+bM0eLFi5WVlaU777xTCxcu1MKFCzVz5ky9++67+uSTTyRJ69ev15NPPqmxY8dq+/btWrx4sbp27SpJeuONN9S5c2c98sgjKigoUEFBgaKiolRQUKDExES1b99e69ev1+LFi/XTTz/pj3/8Y5nH4u/vr5ycHL3zzjvnfLzFxcUqLCz0uAAAgKrN3+4B2rZtq7S0NElSixYtNHXqVC1btkwpKSke51LFxMTopZde0pAhQ/T222+7t586dUrTpk1TbGysJOmuu+7SzJkz9dNPPykkJEStWrVScnKyMjMz1b9/f+3du1e1a9fWrbfeKqfTqWbNmunqq6+WJIWFhSkwMFDBwcGKiIhw/45p06apQ4cO+tvf/ube9sEHHygqKkrff/+94uPjJUlxcXGaNGnSBR/v+PHjNWbMmMt70gAAQKVi+xGutm3belxv3LixDh48KEnKzMxUSkqKrrjiCjmdTg0cOFC//PKLjh075r59cHCwO7YkKTw8XNHR0QoJCfHYduY+U1JS1KxZMzVv3lz333+/Zs2apePHj19wxtzcXGVmZiokJMR9admypSRpx44d7tt16tTpdx/vqFGjdOTIEfdl3759v/szAACgcrM9uAICAjyuOxwOuVwu7dmzR71791br1q01b9485ebm6q233pJ0+qjWhX7+fPcpSU6nUxs2bNDs2bPVuHFjvfjii2rXrp1+/fXX887ocrl02223KS8vz+OSn5/vfjlSkmrXrv27jzcoKEihoaEeFwAAULXZ/pLi+axfv14lJSV69dVX5ed3ugvnzp3rk/v29/dXt27d1K1bN6WlpalOnTpavny57rzzTgUGBnqcYC9JHTp00Lx58xQdHS1//wr7lAEAgArK9iNc5xMbG6uSkhK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CwuzsrKyrIKCAvfl+PHj7tuwFmaNGjXK+uqrr6xdu3ZZmzZtsv7yl79Yfn5+1pdffmlZFs+/nf73XYqWxVqUh6efftrKysqydu7caa1evdq69dZbLafT6f577Ks1ILhs9NZbb1nNmjWzAgMDrQ4dOrjfFg8zMjMzLUllLg888IBlWaff/puWlmZFRERYQUFBVteuXa3NmzfbO3QVdK41kGR9+OGH7tuwFmYNGjTI/b89DRs2tG655RZ3bFkWz7+dzg4u1sK8/v37W40bN7YCAgKsyMhI684777S2bt3q3u+rNXBYlmX54AgcAAAAzoNzuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAwjuAAAAAz7PyJauZFJ+x/AAAAAAElFTkSuQmCC"},453:(A,e,t)=>{t.d(e,{A:()=>a});const a=t.p+"assets/images/barex3-10f7f96ec4c5c233666af459ad98447d.png"},6682:(A,e,t)=>{t.d(e,{A:()=>a});const a=t.p+"assets/images/barex4-243bfdca4b1a1d8f6fdc72a0cd9af62e.png"},8453:(A,e,t)=>{t.d(e,{R:()=>n,x:()=>C});var a=t(6540);const r={},s=a.createContext(r);function n(A){const e=a.useContext(s);return a.useMemo((function(){return"function"==typeof A?A(e):{...e,...A}}),[e,A])}function C(A){let e;return e=A.disableParentContext?"function"==typeof A.components?A.components(r):A.components||r:n(A.components),a.createElement(s.Provider,{value:e},A.children)}}}]); \ No newline at end of file diff --git a/assets/js/416.2da58a29.js b/assets/js/5049.fc44c2c6.js similarity index 52% rename from assets/js/416.2da58a29.js rename to assets/js/5049.fc44c2c6.js index 556a443b..3a7abde5 100644 --- a/assets/js/416.2da58a29.js +++ b/assets/js/5049.fc44c2c6.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[416],{416:(e,r,c)=>{c.r(r)}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5049],{7430:(e,r,c)=>{c.r(r)}}]); \ No newline at end of file diff --git a/assets/js/541bd1cc.7439de24.js b/assets/js/541bd1cc.7439de24.js deleted file mode 100644 index 1249538f..00000000 --- a/assets/js/541bd1cc.7439de24.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[7354],{9076:e=>{e.exports=JSON.parse('{"tag":{"label":"histogram","permalink":"/bpd-reference/docs/tags/histogram","allTagsPath":"/bpd-reference/docs/tags","count":3,"items":[{"id":"statistical-inference/bootstrapping","title":"Bootstrapping and Confidence Intervals","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/bootstrapping"},{"id":"statistical-inference/hypothesis_test","title":"Hypothesis Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/hypothesis_test"},{"id":"statistical-inference/permutation_test","title":"Permutation Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/permutation_test"}],"unlisted":false}}')}}]); \ No newline at end of file diff --git a/assets/js/55960ee5.cb430b37.js b/assets/js/55960ee5.cb430b37.js new file mode 100644 index 00000000..97fb3bb5 --- /dev/null +++ b/assets/js/55960ee5.cb430b37.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5151],{350:e=>{e.exports=JSON.parse('[{"label":"for-loop","permalink":"/bpd-reference/docs/tags/for-loop","count":3},{"label":"histogram","permalink":"/bpd-reference/docs/tags/histogram","count":3},{"label":"querying","permalink":"/bpd-reference/docs/tags/querying","count":3},{"label":"functions","permalink":"/bpd-reference/docs/tags/functions","count":2},{"label":"normal distributions","permalink":"/bpd-reference/docs/tags/normal-distributions","count":1},{"label":"standard units","permalink":"/bpd-reference/docs/tags/standard-units","count":1}]')}}]); \ No newline at end of file diff --git a/assets/js/5d6a2894.ac62096c.js b/assets/js/5d6a2894.ac62096c.js new file mode 100644 index 00000000..790bcc4d --- /dev/null +++ b/assets/js/5d6a2894.ac62096c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5622],{1168:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var t=r(4848),a=r(8453),s=(r(8597),r(8205));const c={sidebar_position:1},i=void 0,d={id:"documentation/arrays-and-numpy/np.percentile()",title:"np.percentile()",description:"np.percentile(arr, p)",source:"@site/docs/documentation/arrays-and-numpy/np.percentile().md",sourceDirName:"documentation/arrays-and-numpy",slug:"/documentation/arrays-and-numpy/np.percentile()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.percentile()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/arrays-and-numpy/np.percentile().md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"np.count_nonzero()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.count_nonzero()"},next:{title:"np.round()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.round()"}},o={},l=[];function p(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"np.percentile(arr, p)"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"The pth percentile of the numbers in arr."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Input:"}),(0,t.jsxs)("dd",{className:"parameter",children:["arr : ",(0,t.jsx)("em",{children:"array"})]}),(0,t.jsx)("dd",{className:"parameter-description",children:"The array from which to calculate the percentile."}),(0,t.jsxs)("dd",{className:"parameter",children:["p : ",(0,t.jsx)("em",{children:"float or array of floats"})]}),(0,t.jsx)("dd",{className:"parameter-description",children:"Percentile or sequence of percentiles to compute, which must be between 0 and 100 inclusive."}),(0,t.jsx)("dt",{className:"term",children:"Returns:"}),(0,t.jsx)("dd",{children:"percentile - The pth percentile of the array values."}),(0,t.jsx)("dt",{className:"term",children:"Return Type:"}),(0,t.jsx)("dd",{children:"float or ndarray"}),(0,t.jsx)("dd",{className:"return-description",children:"The result is a single float if p is a single percentile or an ndarray if multiple percentiles are given."})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\nweight_ser\n"})}),"\n",(0,t.jsx)(s.A,{data:'{"name":"Weight","dtype":"float64","index":["dog_001","cat_001","cat_002","dog_002","dog_003","ham_001","ham_002"],"data":[40.0,15.0,20.0,80.0,25.0,1.0,0.25]}'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"weight_arr = np.array(weight_ser)\nweight_arr\n"})}),"\n",(0,t.jsx)(n.p,{children:"array([40. , 15. , 20. , 80. , 25. , 1. , 0.25])"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"np.percentile(weight_arr, 50)\n"})}),"\n",(0,t.jsx)(n.p,{children:"12.5"})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,n,r)=>{r.d(n,{A:()=>a});r(6540);var t=r(4848);const a=e=>{let{data:n}=e,r=[],a=[],s="",c=[];if(n){const e=JSON.parse(n);r=e.columns||[],a=e.data||[],s=e.indexName||"Index",c=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:s}),r.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:a.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:c[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(r=e,"boolean"==typeof r?r.toString().charAt(0).toUpperCase()+r.toString().slice(1):r)},n);var r}))]},n)))})]})})}},8205:(e,n,r)=>{r.d(n,{A:()=>a});r(6540);var t=r(4848);const a=e=>{let{data:n}=e,r=[],a=[],s="",c="";if(n)try{const e=JSON.parse(n);s=e.name||"",c=e.dtype||"Unknown type",r=e.index||[],a=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=a.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:i.map(((e,n)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:r[n]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",s,", dtype: ",c]})]})}},8453:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>i});var t=r(6540);const a={},s=t.createContext(a);function c(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d6a2894.defd590f.js b/assets/js/5d6a2894.defd590f.js deleted file mode 100644 index ccf3b757..00000000 --- a/assets/js/5d6a2894.defd590f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5622],{1168:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>m,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var t=r(4848),a=r(8453),s=(r(8597),r(8205));const c={sidebar_position:1},i=void 0,d={id:"documentation/arrays-and-numpy/np.percentile()",title:"np.percentile()",description:"np.percentile(arr, p)",source:"@site/docs/documentation/arrays-and-numpy/np.percentile().md",sourceDirName:"documentation/arrays-and-numpy",slug:"/documentation/arrays-and-numpy/np.percentile()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.percentile()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/arrays-and-numpy/np.percentile().md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"np.count_nonzero()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.count_nonzero()"},next:{title:"np.round()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.round()"}},o={},l=[];function p(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"np.percentile(arr, p)"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"The pth percentile of the numbers in arr."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Input:"}),(0,t.jsxs)("dd",{className:"parameter",children:["arr : ",(0,t.jsx)("em",{children:"array"})]}),(0,t.jsx)("dd",{className:"parameter-description",children:"The array from which to calculate the percentile."}),(0,t.jsxs)("dd",{className:"parameter",children:["p : ",(0,t.jsx)("em",{children:"float or array of floats"})]}),(0,t.jsx)("dd",{className:"parameter-description",children:"Percentile or sequence of percentiles to compute, which must be between 0 and 100 inclusive."}),(0,t.jsx)("dt",{className:"term",children:"Returns:"}),(0,t.jsx)("dd",{children:"percentile - The pth percentile of the array values."}),(0,t.jsx)("dt",{className:"term",children:"Return Type:"}),(0,t.jsx)("dd",{children:"float or ndarray"}),(0,t.jsx)("dd",{className:"return-description",children:"The result is a single float if p is a single percentile or an ndarray if multiple percentiles are given."})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\r\nweight_ser\n"})}),"\n",(0,t.jsx)(s.A,{data:'{"name":"Weight","dtype":"float64","index":["dog_001","cat_001","cat_002","dog_002","dog_003","ham_001","ham_002"],"data":[40.0,15.0,20.0,80.0,25.0,1.0,0.25]}'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"weight_arr = np.array(weight_ser)\r\nweight_arr\n"})}),"\n",(0,t.jsx)(n.p,{children:"array([40. , 15. , 20. , 80. , 25. , 1. , 0.25])"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"np.percentile(weight_arr, 50)\n"})}),"\n",(0,t.jsx)(n.p,{children:"12.5"})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,n,r)=>{r.d(n,{A:()=>a});r(6540);var t=r(4848);const a=e=>{let{data:n}=e,r=[],a=[],s="",c=[];if(n){const e=JSON.parse(n);r=e.columns||[],a=e.data||[],s=e.indexName||"Index",c=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:s}),r.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:a.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:c[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(r=e,"boolean"==typeof r?r.toString().charAt(0).toUpperCase()+r.toString().slice(1):r)},n);var r}))]},n)))})]})})}},8205:(e,n,r)=>{r.d(n,{A:()=>a});r(6540);var t=r(4848);const a=e=>{let{data:n}=e,r=[],a=[],s="",c="";if(n)try{const e=JSON.parse(n);s=e.name||"",c=e.dtype||"Unknown type",r=e.index||[],a=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=a.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:i.map(((e,n)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:r[n]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",s,", dtype: ",c]})]})}},8453:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>i});var t=r(6540);const a={},s=t.createContext(a);function c(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5ddb68ca.036894d0.js b/assets/js/5ddb68ca.036894d0.js new file mode 100644 index 00000000..259cada5 --- /dev/null +++ b/assets/js/5ddb68ca.036894d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6280],{5408:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var t=r(4848),n=r(8453),a=(r(8597),r(8205));const o={sidebar_position:11},i=void 0,d={id:"documentation/series-methods/ser.str.upper()",title:"ser.str.upper()",description:"ser.str.upper()",source:"@site/docs/documentation/series-methods/ser.str.upper().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.upper()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.upper()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.upper().md",tags:[],version:"current",sidebarPosition:11,frontMatter:{sidebar_position:11},sidebar:"docsSidebar",previous:{title:"ser.str.lower()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.lower()"},next:{title:"ser.str.capitalize()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.capitalize()"}},c={},l=[];function p(e){const s={code:"code",hr:"hr",pre:"pre",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.str.upper()"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Converts strings in the Series to uppercase."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Returns:"}),(0,t.jsx)("dd",{children:"Returns a Series with each element uppercased."}),(0,t.jsx)("dt",{className:"term",children:"Return Type:"}),(0,t.jsx)("dd",{children:"Series"})]})]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\ncomment_ser\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser.str.upper()\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" THERE ARE NO BAD DOGS, ONLY BAD OWNERS.","MY BEST BIRTHDAY PRESENT EVER!!!","****ALL YOU NEED IS LOVE AND A CAT.****","LOVE IS A WET NOSE AND A WAGGING TAIL.","BE THE PERSON YOUR DOG THINKS YOU ARE.","NO, THANK YOU!","NO, THANK YOU!","NO, THANK YOU!"]}'})]})}function m(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,s,r)=>{r.d(s,{A:()=>n});r(6540);var t=r(4848);const n=e=>{let{data:s}=e,r=[],n=[],a="",o=[];if(s){const e=JSON.parse(s);r=e.columns||[],n=e.data||[],a=e.indexName||"Index",o=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:a}),r.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:n.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:o[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(r=e,"boolean"==typeof r?r.toString().charAt(0).toUpperCase()+r.toString().slice(1):r)},s);var r}))]},s)))})]})})}},8205:(e,s,r)=>{r.d(s,{A:()=>n});r(6540);var t=r(4848);const n=e=>{let{data:s}=e,r=[],n=[],a="",o="";if(s)try{const e=JSON.parse(s);a=e.name||"",o=e.dtype||"Unknown type",r=e.index||[],n=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=n.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:i.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:r[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",o]})]})}},8453:(e,s,r)=>{r.d(s,{R:()=>o,x:()=>i});var t=r(6540);const n={},a=t.createContext(n);function o(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5ddb68ca.b60b2c9d.js b/assets/js/5ddb68ca.b60b2c9d.js deleted file mode 100644 index 41ca8a21..00000000 --- a/assets/js/5ddb68ca.b60b2c9d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6280],{5408:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var t=r(4848),n=r(8453),a=(r(8597),r(8205));const o={sidebar_position:11},i=void 0,d={id:"documentation/series-methods/ser.str.upper()",title:"ser.str.upper()",description:"ser.str.upper()",source:"@site/docs/documentation/series-methods/ser.str.upper().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.upper()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.upper()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.upper().md",tags:[],version:"current",sidebarPosition:11,frontMatter:{sidebar_position:11},sidebar:"docsSidebar",previous:{title:"ser.str.lower()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.lower()"},next:{title:"ser.str.capitalize()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.capitalize()"}},c={},l=[];function p(e){const s={code:"code",hr:"hr",pre:"pre",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.str.upper()"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Converts strings in the Series to uppercase."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Returns:"}),(0,t.jsx)("dd",{children:"Returns a Series with each element uppercased."}),(0,t.jsx)("dt",{className:"term",children:"Return Type:"}),(0,t.jsx)("dd",{children:"Series"})]})]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\r\ncomment_ser\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser.str.upper()\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" THERE ARE NO BAD DOGS, ONLY BAD OWNERS.","MY BEST BIRTHDAY PRESENT EVER!!!","****ALL YOU NEED IS LOVE AND A CAT.****","LOVE IS A WET NOSE AND A WAGGING TAIL.","BE THE PERSON YOUR DOG THINKS YOU ARE.","NO, THANK YOU!","NO, THANK YOU!","NO, THANK YOU!"]}'})]})}function m(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,s,r)=>{r.d(s,{A:()=>n});r(6540);var t=r(4848);const n=e=>{let{data:s}=e,r=[],n=[],a="",o=[];if(s){const e=JSON.parse(s);r=e.columns||[],n=e.data||[],a=e.indexName||"Index",o=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:a}),r.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:n.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:o[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(r=e,"boolean"==typeof r?r.toString().charAt(0).toUpperCase()+r.toString().slice(1):r)},s);var r}))]},s)))})]})})}},8205:(e,s,r)=>{r.d(s,{A:()=>n});r(6540);var t=r(4848);const n=e=>{let{data:s}=e,r=[],n=[],a="",o="";if(s)try{const e=JSON.parse(s);a=e.name||"",o=e.dtype||"Unknown type",r=e.index||[],n=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=n.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:i.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:r[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",o]})]})}},8453:(e,s,r)=>{r.d(s,{R:()=>o,x:()=>i});var t=r(6540);const n={},a=t.createContext(n);function o(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.185788dc.js b/assets/js/5e95c892.c487ac59.js similarity index 81% rename from assets/js/5e95c892.185788dc.js rename to assets/js/5e95c892.c487ac59.js index 94e7967b..13983057 100644 --- a/assets/js/5e95c892.185788dc.js +++ b/assets/js/5e95c892.c487ac59.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9647],{7121:(e,r,s)=>{s.r(r),s.d(r,{default:()=>t});s(6540);var c=s(4164),n=s(5500),u=s(7559),a=s(2831),d=s(4561),p=s(4848);function t(e){return(0,p.jsx)(n.e3,{className:(0,c.A)(u.G.wrapper.docsPages),children:(0,p.jsx)(d.A,{children:(0,a.v)(e.route.routes)})})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9647],{7121:(e,r,s)=>{s.r(r),s.d(r,{default:()=>t});s(6540);var c=s(4164),n=s(5500),u=s(7559),a=s(2831),d=s(3932),p=s(4848);function t(e){return(0,p.jsx)(n.e3,{className:(0,c.A)(u.G.wrapper.docsPages),children:(0,p.jsx)(d.A,{children:(0,a.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/60c4aef6.1c8d9eba.js b/assets/js/60c4aef6.1c8d9eba.js deleted file mode 100644 index 0ae4329a..00000000 --- a/assets/js/60c4aef6.1c8d9eba.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6142],{3071:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=n(4848),i=n(8453);n(8597),n(5158);const r={sidebar_position:4,sidebar_label:"Observed & Test Statistic",title:"Observed & Test Statistic"},o=void 0,a={id:"statistical-inference/obs_and_test_stats",title:"Observed & Test Statistic",description:"Concept",source:"@site/docs/statistical-inference/obs_and_test_stats.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/obs_and_test_stats",permalink:"/bpd-reference/docs/statistical-inference/obs_and_test_stats",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/obs_and_test_stats.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4,sidebar_label:"Observed & Test Statistic",title:"Observed & Test Statistic"},sidebar:"statsSidebar",previous:{title:"Null & Alternative Hypothesis",permalink:"/bpd-reference/docs/statistical-inference/null_and_alt"},next:{title:"P-value",permalink:"/bpd-reference/docs/statistical-inference/p_value"}},l={},d=[{value:"Concept",id:"concept",level:2}];function c(e){const t={admonition:"admonition",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"concept",children:"Concept"}),"\n",(0,s.jsxs)(t.admonition,{title:"Terminology",type:"info",children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Experiment"}),": A process whose outcome is random."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Example: flipping 100 coins."}),"\n"]}),(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Observed Statistic"}),": A statistic computed from the observed data."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Example: The number of heads observed."}),"\n"]}),(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Test Statistic"}),": A statistic computed from a sample generated under the assumption that the null hypothesis is true."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Think of the test statistic a number you write down each time you perform an experiment."}),"\n",(0,s.jsx)(t.li,{children:"The test statistic should be such that high observed values lean towards one hypothesis and low observed values lean towards the other."}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Common Test Statistic"})," \ud83c\udf1f","\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Total Variation Distance (TVD)"}),": A test statistic that quantifies how different ",(0,s.jsx)(t.strong,{children:"two categorical distributions"})," are by calculating the sum of the absolute differences of their proportions, all divided by 2."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"The TVD is not used for permutation tests"}),"\n",(0,s.jsxs)(t.li,{children:['\u2705 Used for assessing whether an "observed sample" was drawn randomly from a known ',(0,s.jsx)(t.strong,{children:"categorical distribution"}),":"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Absolute Difference"})," in group mean/median/number of times a certain event happens."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\u2705 Used for measuring how different two ",(0,s.jsx)(t.strong,{children:"numerical distributions"})," are, and when the alternative hypothesis is ",(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.em,{children:"not equal to"})}),'. For example, "the coin is biased" or "the probability of tossing a head is 0.5".']}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Difference"})," in group mean/median/number of times a certain event happens"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\u2705 Used for measuring how different two ",(0,s.jsx)(t.strong,{children:"numerical distributions"})," are, and the alternative hypothesis is ",(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.em,{children:"less than"})})," or ",(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.em,{children:"greater than"})}),'. For example, "the coin is biased towards heads" or "the probability of tossing a head is greater then 0.5".']}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]})]}),"\n",(0,s.jsxs)(t.admonition,{type:"note",children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"3 Ways of Computing TVD"})," \ud83e\uddee"]}),(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Follow the definition (calculating the sum of the absolute differences of the two distributions' proportions, all divided by 2)"}),"\n",(0,s.jsx)(t.li,{}),"\n",(0,s.jsx)(t.li,{}),"\n"]})]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8597:(e,t,n)=>{n.d(t,{A:()=>i});n(6540);var s=n(4848);const i=e=>{let{data:t}=e,n=[],i=[],r="",o=[];if(t){const e=JSON.parse(t);n=e.columns||[],i=e.data||[],r=e.indexName||"Index",o=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:r}),n.map(((e,t)=>(0,s.jsx)("th",{children:e},t)))]})}),(0,s.jsx)("tbody",{children:i.map(((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:o[t]}),e.map(((e,t)=>{return(0,s.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},t);var n}))]},t)))})]})})}},5158:(e,t,n)=>{n.d(t,{A:()=>r});var s=n(6540),i=n(4848);const r=function(e){let{src:t,sourceLink:n,width:r="100%",height:o="100%",paddingBottom:a="56.25%"}=e;const[l,d]=(0,s.useState)(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"relative",height:"0",paddingBottom:a,overflow:"hidden",maxWidth:"100%"},children:(0,i.jsx)("iframe",{src:t,style:{position:"absolute",top:0,left:0,width:r,height:o,frameBorder:"0",allowFullScreen:!0}},l)}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"20px 0"},children:(0,i.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:"(Source)"})}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"10px 0"},children:(0,i.jsx)("button",{onClick:()=>{d((e=>e+1))},style:{backgroundColor:"#4CAF50",color:"white",padding:"10px 20px",border:"none",borderRadius:"5px",cursor:"pointer",outline:"none",fontSize:"16px",fontWeight:"bold",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",transition:"background-color 0.3s"},onMouseOver:e=>e.currentTarget.style.backgroundColor="#45a049",onMouseOut:e=>e.currentTarget.style.backgroundColor="#4CAF50",children:"Restart Diagram"})})]})}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(6540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/60c4aef6.62dc7b2e.js b/assets/js/60c4aef6.62dc7b2e.js new file mode 100644 index 00000000..62da85eb --- /dev/null +++ b/assets/js/60c4aef6.62dc7b2e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6142],{3071:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=n(4848),i=n(8453);n(8597),n(5158);const r={sidebar_position:4,sidebar_label:"Observed & Test Statistic",title:"Observed & Test Statistic"},o=void 0,a={id:"statistical-inference/obs_and_test_stats",title:"Observed & Test Statistic",description:"Concept",source:"@site/docs/statistical-inference/obs_and_test_stats.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/obs_and_test_stats",permalink:"/bpd-reference/docs/statistical-inference/obs_and_test_stats",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/obs_and_test_stats.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4,sidebar_label:"Observed & Test Statistic",title:"Observed & Test Statistic"},sidebar:"statsSidebar",previous:{title:"Null & Alternative Hypothesis",permalink:"/bpd-reference/docs/statistical-inference/null_and_alt"},next:{title:"P-value",permalink:"/bpd-reference/docs/statistical-inference/p_value"}},l={},d=[{value:"Concept",id:"concept",level:2},{value:"Common Test Statistic \ud83c\udf1f",id:"common-test-statistic-",level:2},{value:"1. Absolute Difference",id:"1-absolute-difference",level:3},{value:"2. Difference",id:"2-difference",level:3},{value:"3. Total Variation Distance (TVD)",id:"3-total-variation-distance-tvd",level:3}];function c(e){const t={admonition:"admonition",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"concept",children:"Concept"}),"\n",(0,s.jsxs)(t.admonition,{title:"Terminology",type:"info",children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Experiment"}),": A process whose outcome is random."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Example: flipping 100 coins."}),"\n"]}),(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Observed Statistic"}),": A statistic computed from the observed data."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Example: The number of heads observed."}),"\n"]}),(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Test Statistic"}),": A statistic computed from a sample generated under the assumption that the null hypothesis is true."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Think of the test statistic a number you write down each time you perform an experiment."}),"\n",(0,s.jsx)(t.li,{children:"The test statistic should be such that high observed values lean towards one hypothesis and low observed values lean towards the other."}),"\n"]})]}),"\n",(0,s.jsx)(t.h2,{id:"common-test-statistic-",children:"Common Test Statistic \ud83c\udf1f"}),"\n",(0,s.jsx)(t.h3,{id:"1-absolute-difference",children:"1. Absolute Difference"}),"\n",(0,s.jsx)(t.p,{children:"Absolute difference in group mean/median/number of times a certain event happens."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\u2705 Used for measuring how different two ",(0,s.jsx)(t.strong,{children:"numerical distributions"})," are, and when the alternative hypothesis is ",(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.em,{children:"not equal to"})}),'. For example, "the coin is biased" or "the probability of tossing a head is 0.5".']}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"2-difference",children:"2. Difference"}),"\n",(0,s.jsx)(t.p,{children:"Difference in group mean/median/number of times a certain event happens"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\u2705 Used for measuring how different two ",(0,s.jsx)(t.strong,{children:"numerical distributions"})," are, and the alternative hypothesis is ",(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.em,{children:"less than"})})," or ",(0,s.jsx)(t.strong,{children:(0,s.jsx)(t.em,{children:"greater than"})}),'. For example, "the coin is biased towards heads" or "the probability of tossing a head is greater then 0.5".']}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"3-total-variation-distance-tvd",children:"3. Total Variation Distance (TVD)"}),"\n",(0,s.jsxs)(t.p,{children:["A test statistic that quantifies how different ",(0,s.jsx)(t.strong,{children:"two categorical distributions"})," are by calculating the sum of the absolute differences of their proportions, all divided by 2."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"The TVD is not used for permutation tests"}),"\n",(0,s.jsxs)(t.li,{children:['\u2705 Used for assessing whether an "observed sample" was drawn randomly from a known ',(0,s.jsx)(t.strong,{children:"categorical distribution"}),":"]}),"\n"]}),"\n",(0,s.jsxs)(t.admonition,{type:"note",children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"3 Ways of Computing TVD"})," \ud83e\uddee"]}),(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Follow the definition (calculating the sum of the absolute differences of the two distributions' proportions, all divided by 2)"}),"\n",(0,s.jsx)(t.li,{}),"\n",(0,s.jsx)(t.li,{}),"\n"]})]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8597:(e,t,n)=>{n.d(t,{A:()=>i});n(6540);var s=n(4848);const i=e=>{let{data:t}=e,n=[],i=[],r="",o=[];if(t){const e=JSON.parse(t);n=e.columns||[],i=e.data||[],r=e.indexName||"Index",o=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:r}),n.map(((e,t)=>(0,s.jsx)("th",{children:e},t)))]})}),(0,s.jsx)("tbody",{children:i.map(((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:o[t]}),e.map(((e,t)=>{return(0,s.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},t);var n}))]},t)))})]})})}},5158:(e,t,n)=>{n.d(t,{A:()=>r});var s=n(6540),i=n(4848);const r=function(e){let{src:t,sourceLink:n,width:r="100%",height:o="100%",paddingBottom:a="56.25%"}=e;const[l,d]=(0,s.useState)(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"relative",height:"0",paddingBottom:a,overflow:"hidden",maxWidth:"100%"},children:(0,i.jsx)("iframe",{src:t,style:{position:"absolute",top:0,left:0,width:r,height:o,frameBorder:"0",allowFullScreen:!0}},l)}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"20px 0"},children:(0,i.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:"(Source)"})}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"10px 0"},children:(0,i.jsx)("button",{onClick:()=>{d((e=>e+1))},style:{backgroundColor:"#4CAF50",color:"white",padding:"10px 20px",border:"none",borderRadius:"5px",cursor:"pointer",outline:"none",fontSize:"16px",fontWeight:"bold",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",transition:"background-color 0.3s"},onMouseOver:e=>e.currentTarget.style.backgroundColor="#45a049",onMouseOut:e=>e.currentTarget.style.backgroundColor="#4CAF50",children:"Restart Diagram"})})]})}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var s=n(6540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/62efbc4a.00648062.js b/assets/js/62efbc4a.00648062.js new file mode 100644 index 00000000..0e0a2965 --- /dev/null +++ b/assets/js/62efbc4a.00648062.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4594],{7442:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var r=t(4848),n=t(8453),a=(t(8597),t(8205));const o={sidebar_position:13},i=void 0,d={id:"documentation/series-methods/ser.str.title()",title:"ser.str.title()",description:"ser.str.title()",source:"@site/docs/documentation/series-methods/ser.str.title().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.title()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.title()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.title().md",tags:[],version:"current",sidebarPosition:13,frontMatter:{sidebar_position:13},sidebar:"docsSidebar",previous:{title:"ser.str.capitalize()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.capitalize()"},next:{title:"ser.str.replace()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.replace()"}},c={},l=[];function m(e){const s={code:"code",hr:"hr",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("code",{children:"ser.str.title()"}),"\n",(0,r.jsxs)("div",{className:"base",children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Converts strings in the Series to titlecase. Every beginning character to a string of letters will be uppercased."})}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Returns:"}),(0,r.jsx)("dd",{children:"Returns a Series with each element titlecased."}),(0,r.jsx)("dt",{className:"term",children:"Return Type:"}),(0,r.jsx)("dd",{children:"Series"})]})]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\ncomment_ser\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser.str.title()\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There Are No Bad Dogs, Only Bad Owners.","My Best Birthday Present Ever!!!","****All You Need Is Love And A Cat.****","Love Is A Wet Nose And A Wagging Tail.","Be The Person Your Dog Thinks You Are.","No, Thank You!","No, Thank You!","No, Thank You!"]}'})]})}function h(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",o=[];if(s){const e=JSON.parse(s);t=e.columns||[],n=e.data||[],a=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:a}),t.map(((e,s)=>(0,r.jsx)("th",{children:e},s)))]})}),(0,r.jsx)("tbody",{children:n.map(((e,s)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:o[s]}),e.map(((e,s)=>{return(0,r.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",o="";if(s)try{const e=JSON.parse(s);a=e.name||"",o=e.dtype||"Unknown type",t=e.index||[],n=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=n.map((e=>JSON.stringify(e)));return(0,r.jsxs)("div",{className:"series-container",children:[(0,r.jsx)("ul",{className:"series-list",children:i.map(((e,s)=>(0,r.jsxs)("li",{className:"series-item",children:[(0,r.jsx)("span",{className:"series-index",children:t[s]}),(0,r.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,r.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",o]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>i});var r=t(6540);const n={},a=r.createContext(n);function o(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/62efbc4a.b6392b54.js b/assets/js/62efbc4a.b6392b54.js deleted file mode 100644 index a8ec8dfd..00000000 --- a/assets/js/62efbc4a.b6392b54.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4594],{7442:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var r=t(4848),n=t(8453),a=(t(8597),t(8205));const o={sidebar_position:13},i=void 0,d={id:"documentation/series-methods/ser.str.title()",title:"ser.str.title()",description:"ser.str.title()",source:"@site/docs/documentation/series-methods/ser.str.title().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.title()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.title()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.title().md",tags:[],version:"current",sidebarPosition:13,frontMatter:{sidebar_position:13},sidebar:"docsSidebar",previous:{title:"ser.str.capitalize()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.capitalize()"},next:{title:"ser.str.replace()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.replace()"}},c={},l=[];function m(e){const s={code:"code",hr:"hr",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("code",{children:"ser.str.title()"}),"\n",(0,r.jsxs)("div",{className:"base",children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Converts strings in the Series to titlecase. Every beginning character to a string of letters will be uppercased."})}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Returns:"}),(0,r.jsx)("dd",{children:"Returns a Series with each element titlecased."}),(0,r.jsx)("dt",{className:"term",children:"Return Type:"}),(0,r.jsx)("dd",{children:"Series"})]})]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\r\ncomment_ser\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser.str.title()\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There Are No Bad Dogs, Only Bad Owners.","My Best Birthday Present Ever!!!","****All You Need Is Love And A Cat.****","Love Is A Wet Nose And A Wagging Tail.","Be The Person Your Dog Thinks You Are.","No, Thank You!","No, Thank You!","No, Thank You!"]}'})]})}function h(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",o=[];if(s){const e=JSON.parse(s);t=e.columns||[],n=e.data||[],a=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:a}),t.map(((e,s)=>(0,r.jsx)("th",{children:e},s)))]})}),(0,r.jsx)("tbody",{children:n.map(((e,s)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:o[s]}),e.map(((e,s)=>{return(0,r.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",o="";if(s)try{const e=JSON.parse(s);a=e.name||"",o=e.dtype||"Unknown type",t=e.index||[],n=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=n.map((e=>JSON.stringify(e)));return(0,r.jsxs)("div",{className:"series-container",children:[(0,r.jsx)("ul",{className:"series-list",children:i.map(((e,s)=>(0,r.jsxs)("li",{className:"series-item",children:[(0,r.jsx)("span",{className:"series-index",children:t[s]}),(0,r.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,r.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",o]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>i});var r=t(6540);const n={},a=r.createContext(n);function o(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/655190df.23a73ffd.js b/assets/js/655190df.23a73ffd.js new file mode 100644 index 00000000..2dbb670f --- /dev/null +++ b/assets/js/655190df.23a73ffd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4567],{5364:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var n=t(4848),r=t(8453),a=(t(8597),t(8205));const i={sidebar_position:2},o=void 0,c={id:"documentation/series-methods/ser.max()",title:"ser.max()",description:"ser.max()",source:"@site/docs/documentation/series-methods/ser.max().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.max()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.max()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.max().md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"ser.count()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.count()"},next:{title:"ser.min()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.min()"}},d={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("code",{children:"ser.max()"}),"\n",(0,n.jsx)("div",{className:"base",children:(0,n.jsx)("p",{children:(0,n.jsx)("strong",{children:"Returns the maximum of the values in the Series."})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\nweight_ser\n"})}),"\n",(0,n.jsx)(a.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"weight_ser.max()\n"})}),"\n",(0,n.jsx)(s.p,{children:"80.0"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>r});t(6540);var n=t(4848);const r=e=>{let{data:s}=e,t=[],r=[],a="",i=[];if(s){const e=JSON.parse(s);t=e.columns||[],r=e.data||[],a=e.indexName||"Index",i=e.index||[]}return(0,n.jsx)("div",{className:"dataframe-container",children:(0,n.jsxs)("table",{className:"dataframe-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:a}),t.map(((e,s)=>(0,n.jsx)("th",{children:e},s)))]})}),(0,n.jsx)("tbody",{children:r.map(((e,s)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,n.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>r});t(6540);var n=t(4848);const r=e=>{let{data:s}=e,t=[],r=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",t=e.index||[],r=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=r.map((e=>JSON.stringify(e)));return(0,n.jsxs)("div",{className:"series-container",children:[(0,n.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,n.jsxs)("li",{className:"series-item",children:[(0,n.jsx)("span",{className:"series-index",children:t[s]}),(0,n.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,n.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var n=t(6540);const r={},a=n.createContext(r);function i(e){const s=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/655190df.cff71572.js b/assets/js/655190df.cff71572.js deleted file mode 100644 index 063bf93e..00000000 --- a/assets/js/655190df.cff71572.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4567],{5364:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>l});var n=t(4848),r=t(8453),a=(t(8597),t(8205));const i={sidebar_position:2},o=void 0,c={id:"documentation/series-methods/ser.max()",title:"ser.max()",description:"ser.max()",source:"@site/docs/documentation/series-methods/ser.max().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.max()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.max()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.max().md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"ser.count()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.count()"},next:{title:"ser.min()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.min()"}},d={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("code",{children:"ser.max()"}),"\n",(0,n.jsx)("div",{className:"base",children:(0,n.jsx)("p",{children:(0,n.jsx)("strong",{children:"Returns the maximum of the values in the Series."})})}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\r\nweight_ser\n"})}),"\n",(0,n.jsx)(a.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"weight_ser.max()\n"})}),"\n",(0,n.jsx)(s.p,{children:"80.0"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>r});t(6540);var n=t(4848);const r=e=>{let{data:s}=e,t=[],r=[],a="",i=[];if(s){const e=JSON.parse(s);t=e.columns||[],r=e.data||[],a=e.indexName||"Index",i=e.index||[]}return(0,n.jsx)("div",{className:"dataframe-container",children:(0,n.jsxs)("table",{className:"dataframe-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:a}),t.map(((e,s)=>(0,n.jsx)("th",{children:e},s)))]})}),(0,n.jsx)("tbody",{children:r.map(((e,s)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,n.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>r});t(6540);var n=t(4848);const r=e=>{let{data:s}=e,t=[],r=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",t=e.index||[],r=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=r.map((e=>JSON.stringify(e)));return(0,n.jsxs)("div",{className:"series-container",children:[(0,n.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,n.jsxs)("li",{className:"series-item",children:[(0,n.jsx)("span",{className:"series-index",children:t[s]}),(0,n.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,n.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var n=t(6540);const r={},a=n.createContext(r);function i(e){const s=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/65beeb93.d7acd085.js b/assets/js/65beeb93.92288123.js similarity index 97% rename from assets/js/65beeb93.d7acd085.js rename to assets/js/65beeb93.92288123.js index 0cd0c433..1992ad5b 100644 --- a/assets/js/65beeb93.d7acd085.js +++ b/assets/js/65beeb93.92288123.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2334],{7190:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>n,metadata:()=>i,toc:()=>o});var a=s(4848),r=s(8453);s(8597),s(8205);const n={sidebar_position:2},c=void 0,i={id:"documentation/plotting/Scatter Plot",title:"Scatter Plot",description:"df.plot(kind='scatter', x=datacol, y=datacol)",source:"@site/docs/documentation/plotting/Scatter Plot.md",sourceDirName:"documentation/plotting",slug:"/documentation/plotting/Scatter Plot",permalink:"/bpd-reference/docs/documentation/plotting/Scatter Plot",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/plotting/Scatter Plot.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"Histogram",permalink:"/bpd-reference/docs/documentation/plotting/Histogram"},next:{title:"Bar Plot",permalink:"/bpd-reference/docs/documentation/plotting/Bar Plot"}},d={},o=[];function l(e){const t={a:"a",code:"code",hr:"hr",img:"img",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"df.plot(kind='scatter', x=data_col, y=data_col)"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Create a scatter plot using a DataFrame."})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["kind : ",(0,a.jsx)("em",{children:"string"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"To create a scatter plot, use kind='scatter'"}),(0,a.jsxs)("dd",{className:"parameter",children:["x : ",(0,a.jsx)("em",{children:"label"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column for horizontal coordinates of each point."}),(0,a.jsxs)("dd",{className:"parameter",children:["y : ",(0,a.jsx)("em",{children:"label"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column for vertical coordinates of each point.."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsxs)("dd",{children:["plot - Matplotlib plot created using ",(0,a.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html",children:"parameters"}),"."]}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"Matplotlib plot"})]})]}),"\n",(0,a.jsx)(t.hr,{}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:"pets.plot(kind='scatter', x='Age', y='Weight')\n"})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Scatter plot example 1",src:s(5696).A+"",width:"563",height:"432"})})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8597:(e,t,s)=>{s.d(t,{A:()=>r});s(6540);var a=s(4848);const r=e=>{let{data:t}=e,s=[],r=[],n="",c=[];if(t){const e=JSON.parse(t);s=e.columns||[],r=e.data||[],n=e.indexName||"Index",c=e.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:n}),s.map(((e,t)=>(0,a.jsx)("th",{children:e},t)))]})}),(0,a.jsx)("tbody",{children:r.map(((e,t)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:c[t]}),e.map(((e,t)=>{return(0,a.jsx)("td",{children:(s=e,"boolean"==typeof s?s.toString().charAt(0).toUpperCase()+s.toString().slice(1):s)},t);var s}))]},t)))})]})})}},8205:(e,t,s)=>{s.d(t,{A:()=>r});s(6540);var a=s(4848);const r=e=>{let{data:t}=e,s=[],r=[],n="",c="";if(t)try{const e=JSON.parse(t);n=e.name||"",c=e.dtype||"Unknown type",s=e.index||[],r=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=r.map((e=>JSON.stringify(e)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:i.map(((e,t)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:s[t]}),(0,a.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},t)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",n,", dtype: ",c]})]})}},5696:(e,t,s)=>{s.d(t,{A:()=>a});const a=s.p+"assets/images/scatex1-7f19b56ad8dbc6cedd356c27ea79be77.png"},8453:(e,t,s)=>{s.d(t,{R:()=>c,x:()=>i});var a=s(6540);const r={},n=a.createContext(r);function c(e){const t=a.useContext(n);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),a.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2334],{7190:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>n,metadata:()=>i,toc:()=>o});var a=s(4848),r=s(8453);s(8597),s(8205);const n={sidebar_position:2},c=void 0,i={id:"documentation/plotting/Scatter Plot",title:"Scatter Plot",description:"df.plot(kind='scatter', x=datacol, y=datacol)",source:"@site/docs/documentation/plotting/Scatter Plot.md",sourceDirName:"documentation/plotting",slug:"/documentation/plotting/Scatter Plot",permalink:"/bpd-reference/docs/documentation/plotting/Scatter Plot",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/plotting/Scatter Plot.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"Histogram",permalink:"/bpd-reference/docs/documentation/plotting/Histogram"},next:{title:"Bar Plot",permalink:"/bpd-reference/docs/documentation/plotting/Bar Plot"}},d={},o=[];function l(e){const t={a:"a",code:"code",hr:"hr",img:"img",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"df.plot(kind='scatter', x=data_col, y=data_col)"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Create a scatter plot using a DataFrame."})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["kind : ",(0,a.jsx)("em",{children:"string"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"To create a scatter plot, use kind='scatter'"}),(0,a.jsxs)("dd",{className:"parameter",children:["x : ",(0,a.jsx)("em",{children:"label"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column for horizontal coordinates of each point."}),(0,a.jsxs)("dd",{className:"parameter",children:["y : ",(0,a.jsx)("em",{children:"label"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"Column for vertical coordinates of each point.."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsxs)("dd",{children:["plot - Matplotlib plot created using ",(0,a.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html",children:"parameters"}),"."]}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"Matplotlib plot"})]})]}),"\n",(0,a.jsx)(t.hr,{}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:"pets.plot(kind='scatter', x='Age', y='Weight')\n"})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.img,{alt:"Scatter plot example 1",src:s(4261).A+"",width:"563",height:"432"})})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8597:(e,t,s)=>{s.d(t,{A:()=>r});s(6540);var a=s(4848);const r=e=>{let{data:t}=e,s=[],r=[],n="",c=[];if(t){const e=JSON.parse(t);s=e.columns||[],r=e.data||[],n=e.indexName||"Index",c=e.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:n}),s.map(((e,t)=>(0,a.jsx)("th",{children:e},t)))]})}),(0,a.jsx)("tbody",{children:r.map(((e,t)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:c[t]}),e.map(((e,t)=>{return(0,a.jsx)("td",{children:(s=e,"boolean"==typeof s?s.toString().charAt(0).toUpperCase()+s.toString().slice(1):s)},t);var s}))]},t)))})]})})}},8205:(e,t,s)=>{s.d(t,{A:()=>r});s(6540);var a=s(4848);const r=e=>{let{data:t}=e,s=[],r=[],n="",c="";if(t)try{const e=JSON.parse(t);n=e.name||"",c=e.dtype||"Unknown type",s=e.index||[],r=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=r.map((e=>JSON.stringify(e)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:i.map(((e,t)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:s[t]}),(0,a.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},t)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",n,", dtype: ",c]})]})}},4261:(e,t,s)=>{s.d(t,{A:()=>a});const a=s.p+"assets/images/scatex1-7f19b56ad8dbc6cedd356c27ea79be77.png"},8453:(e,t,s)=>{s.d(t,{R:()=>c,x:()=>i});var a=s(6540);const r={},n=a.createContext(r);function c(e){const t=a.useContext(n);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),a.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6a26c916.af28a919.js b/assets/js/6a26c916.af28a919.js new file mode 100644 index 00000000..c1fa6064 --- /dev/null +++ b/assets/js/6a26c916.af28a919.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4469],{352:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var s=t(4848),i=t(8453);t(8597),t(8205);const r={sidebar_position:1},a=void 0,o={id:"documentation/Functions/Writing Functions",title:"Writing Functions",description:"def function_name(parameters):",source:"@site/docs/documentation/Functions/Writing Functions.md",sourceDirName:"documentation/Functions",slug:"/documentation/Functions/Writing Functions",permalink:"/bpd-reference/docs/documentation/Functions/Writing Functions",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/Functions/Writing Functions.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"df[]",permalink:"/bpd-reference/docs/documentation/querying/df[]"},next:{title:"Applying Functions",permalink:"/bpd-reference/docs/documentation/Functions/Applying Functions"}},c={},d=[];function l(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("code",{children:"def function_name(parameters):"}),"\n",(0,s.jsxs)("div",{className:"base",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:"Define a customizable function in Python."})}),(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"term",children:"Input:"}),(0,s.jsxs)("dd",{className:"parameter",children:["parameters: ",(0,s.jsx)("em",{children:"any data type"})]}),(0,s.jsx)("dd",{className:"parameter-description",children:"These parameters are variables that act as placeholders for the values you pass to the function. A function can take a single parameter or a comma-separated list of parameters. Including parameters is optional; a function may operate without any."}),(0,s.jsx)("dt",{className:"term",children:"Returns:"}),(0,s.jsx)("dd",{children:"The result of the function. If there is no return statement, the function returns None by default."}),(0,s.jsx)("dt",{className:"term",children:"Return Type:"}),(0,s.jsx)("dd",{children:"The type of the returned object depends on the value provided by the return expression. If no return statement is used, the return type is NoneType."})]})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'def is_dog(species):\n """\n Sees if the species is a dog.\n ---\n Input:\n species: a string\n ---\n Output:\n a boolean\n """\n if species == \'dog\':\n return True\n return False\n'})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"is_dog('dog')\n"})}),"\n",(0,s.jsx)(n.p,{children:"True"}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def categorize_animal(index):\n \"\"\"\n Categorizes the animal based on its species, weight, and age.\n ---\n Input:\n index: a string containing the ID of the animal\n ---\n Output:\n a string describing the animal\n \"\"\"\n pets_idx = pets.set_index('ID')\n species = pets_idx.loc[index].get('Species')\n weight = pets_idx.loc[index].get('Weight')\n age = pets_idx.loc[index].get('Age')\n \n # Initialize descriptors\n life_stage = ''\n weight_status = ''\n \n # Define thresholds for dogs\n if species == 'dog':\n if age < 2:\n life_stage = 'Puppy'\n elif age < 7:\n life_stage = 'Adult'\n else:\n life_stage = 'Senior'\n \n if weight < 20:\n weight_status = 'Underweight'\n elif weight <= 60:\n weight_status = 'Normal'\n else:\n weight_status = 'Overweight'\n \n # Define thresholds for cats\n elif species == 'cat':\n if age < 2:\n life_stage = 'Kitten'\n elif age < 10:\n life_stage = 'Adult'\n else:\n life_stage = 'Senior'\n \n if weight < 2:\n weight_status = 'Underweight'\n elif weight <= 10:\n weight_status = 'Normal'\n else:\n weight_status = 'Overweight'\n \n # Define thresholds for hamsters\n elif species == 'hamster':\n if age < 0.5:\n life_stage = 'Young'\n elif age < 2:\n life_stage = 'Adult'\n else:\n life_stage = 'Senior'\n \n if weight < 0.2:\n weight_status = 'Underweight'\n elif weight <= 0.5:\n weight_status = 'Normal'\n else:\n weight_status = 'Overweight'\n \n # Return a combined description as a single string\n return f\"{life_stage} {weight_status}\"\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"categorize_animal(pets.get('ID').iloc[0])\n"})}),"\n",(0,s.jsx)(n.p,{children:"'Adult Normal'"})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8597:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var s=t(4848);const i=e=>{let{data:n}=e,t=[],i=[],r="",a=[];if(n){const e=JSON.parse(n);t=e.columns||[],i=e.data||[],r=e.indexName||"Index",a=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:r}),t.map(((e,n)=>(0,s.jsx)("th",{children:e},n)))]})}),(0,s.jsx)("tbody",{children:i.map(((e,n)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:a[n]}),e.map(((e,n)=>{return(0,s.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},n);var t}))]},n)))})]})})}},8205:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var s=t(4848);const i=e=>{let{data:n}=e,t=[],i=[],r="",a="";if(n)try{const e=JSON.parse(n);r=e.name||"",a=e.dtype||"Unknown type",t=e.index||[],i=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=i.map((e=>JSON.stringify(e)));return(0,s.jsxs)("div",{className:"series-container",children:[(0,s.jsx)("ul",{className:"series-list",children:o.map(((e,n)=>(0,s.jsxs)("li",{className:"series-item",children:[(0,s.jsx)("span",{className:"series-index",children:t[n]}),(0,s.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,s.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",a]})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var s=t(6540);const i={},r=s.createContext(i);function a(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6a26c916.d7db71df.js b/assets/js/6a26c916.d7db71df.js deleted file mode 100644 index b0502b82..00000000 --- a/assets/js/6a26c916.d7db71df.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4469],{352:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var r=t(4848),s=t(8453);t(8597),t(8205);const i={sidebar_position:1},a=void 0,o={id:"documentation/Functions/Writing Functions",title:"Writing Functions",description:"def function_name(parameters):",source:"@site/docs/documentation/Functions/Writing Functions.md",sourceDirName:"documentation/Functions",slug:"/documentation/Functions/Writing Functions",permalink:"/bpd-reference/docs/documentation/Functions/Writing Functions",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/Functions/Writing Functions.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"df[]",permalink:"/bpd-reference/docs/documentation/querying/df[]"},next:{title:"Applying Functions",permalink:"/bpd-reference/docs/documentation/Functions/Applying Functions"}},c={},d=[];function l(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("code",{children:"def function_name(parameters):"}),"\n",(0,r.jsxs)("div",{className:"base",children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Define a customizable function in Python."})}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Input:"}),(0,r.jsxs)("dd",{className:"parameter",children:["parameters: ",(0,r.jsx)("em",{children:"any data type"})]}),(0,r.jsx)("dd",{className:"parameter-description",children:"These parameters are variables that act as placeholders for the values you pass to the function. A function can take a single parameter or a comma-separated list of parameters. Including parameters is optional; a function may operate without any."}),(0,r.jsx)("dt",{className:"term",children:"Returns:"}),(0,r.jsx)("dd",{children:"The result of the function. If there is no return statement, the function returns None by default."}),(0,r.jsx)("dt",{className:"term",children:"Return Type:"}),(0,r.jsx)("dd",{children:"The type of the returned object depends on the value provided by the return expression. If no return statement is used, the return type is NoneType."})]})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'def is_dog(species):\r\n """\r\n Sees if the species is a dog.\r\n ---\r\n Input:\r\n species: a string\r\n ---\r\n Output:\r\n a boolean\r\n """\r\n if species == \'dog\':\r\n return True\r\n return False\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"is_dog('dog')\n"})}),"\n",(0,r.jsx)(n.p,{children:"True"}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def categorize_animal(index):\r\n \"\"\"\r\n Categorizes the animal based on its species, weight, and age.\r\n ---\r\n Input:\r\n index: a string containing the ID of the animal\r\n ---\r\n Output:\r\n a string describing the animal\r\n \"\"\"\r\n pets_idx = pets.set_index('ID')\r\n species = pets_idx.loc[index].get('Species')\r\n weight = pets_idx.loc[index].get('Weight')\r\n age = pets_idx.loc[index].get('Age')\r\n \r\n # Initialize descriptors\r\n life_stage = ''\r\n weight_status = ''\r\n \r\n # Define thresholds for dogs\r\n if species == 'dog':\r\n if age < 2:\r\n life_stage = 'Puppy'\r\n elif age < 7:\r\n life_stage = 'Adult'\r\n else:\r\n life_stage = 'Senior'\r\n \r\n if weight < 20:\r\n weight_status = 'Underweight'\r\n elif weight <= 60:\r\n weight_status = 'Normal'\r\n else:\r\n weight_status = 'Overweight'\r\n \r\n # Define thresholds for cats\r\n elif species == 'cat':\r\n if age < 2:\r\n life_stage = 'Kitten'\r\n elif age < 10:\r\n life_stage = 'Adult'\r\n else:\r\n life_stage = 'Senior'\r\n \r\n if weight < 2:\r\n weight_status = 'Underweight'\r\n elif weight <= 10:\r\n weight_status = 'Normal'\r\n else:\r\n weight_status = 'Overweight'\r\n \r\n # Define thresholds for hamsters\r\n elif species == 'hamster':\r\n if age < 0.5:\r\n life_stage = 'Young'\r\n elif age < 2:\r\n life_stage = 'Adult'\r\n else:\r\n life_stage = 'Senior'\r\n \r\n if weight < 0.2:\r\n weight_status = 'Underweight'\r\n elif weight <= 0.5:\r\n weight_status = 'Normal'\r\n else:\r\n weight_status = 'Overweight'\r\n \r\n # Return a combined description as a single string\r\n return f\"{life_stage} {weight_status}\"\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"categorize_animal(pets.get('ID').iloc[0])\n"})}),"\n",(0,r.jsx)(n.p,{children:"'Adult Normal'"})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8597:(e,n,t)=>{t.d(n,{A:()=>s});t(6540);var r=t(4848);const s=e=>{let{data:n}=e,t=[],s=[],i="",a=[];if(n){const e=JSON.parse(n);t=e.columns||[],s=e.data||[],i=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:i}),t.map(((e,n)=>(0,r.jsx)("th",{children:e},n)))]})}),(0,r.jsx)("tbody",{children:s.map(((e,n)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:a[n]}),e.map(((e,n)=>{return(0,r.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},n);var t}))]},n)))})]})})}},8205:(e,n,t)=>{t.d(n,{A:()=>s});t(6540);var r=t(4848);const s=e=>{let{data:n}=e,t=[],s=[],i="",a="";if(n)try{const e=JSON.parse(n);i=e.name||"",a=e.dtype||"Unknown type",t=e.index||[],s=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=s.map((e=>JSON.stringify(e)));return(0,r.jsxs)("div",{className:"series-container",children:[(0,r.jsx)("ul",{className:"series-list",children:o.map(((e,n)=>(0,r.jsxs)("li",{className:"series-item",children:[(0,r.jsx)("span",{className:"series-index",children:t[n]}),(0,r.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,r.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",a]})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(6540);const s={},i=r.createContext(s);function a(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6d7cf8c9.81b437c0.js b/assets/js/6d7cf8c9.81b437c0.js new file mode 100644 index 00000000..e9b58981 --- /dev/null +++ b/assets/js/6d7cf8c9.81b437c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[8405],{1268:e=>{e.exports=JSON.parse('{"blogPosts":[{"id":"welcome","metadata":{"permalink":"/bpd-reference/blog/welcome","source":"@site/blog/2021-08-26-welcome/index.md","title":"Welcome","description":"Docusaurus blogging features are powered by the blog plugin.","date":"2021-08-26T00:00:00.000Z","tags":[{"label":"facebook","permalink":"/bpd-reference/blog/tags/facebook"},{"label":"hello","permalink":"/bpd-reference/blog/tags/hello"},{"label":"docusaurus","permalink":"/bpd-reference/blog/tags/docusaurus"}],"readingTime":0.405,"hasTruncateMarker":false,"authors":[{"name":"S\xe9bastien Lorber","title":"Docusaurus maintainer","url":"https://sebastienlorber.com","imageURL":"https://github.com/slorber.png","key":"slorber"},{"name":"Yangshun Tay","title":"Front End Engineer @ Facebook","url":"https://github.com/yangshun","imageURL":"https://github.com/yangshun.png","key":"yangshun"}],"frontMatter":{"slug":"welcome","title":"Welcome","authors":["slorber","yangshun"],"tags":["facebook","hello","docusaurus"]},"unlisted":false,"nextItem":{"title":"MDX Blog Post","permalink":"/bpd-reference/blog/mdx-blog-post"}},"content":"[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).\\n\\nSimply add Markdown files (or folders) to the `blog` directory.\\n\\nRegular blog authors can be added to `authors.yml`.\\n\\nThe blog post date can be extracted from filenames, such as:\\n\\n- `2019-05-30-welcome.md`\\n- `2019-05-30-welcome/index.md`\\n\\nA blog post folder can be convenient to co-locate blog post images:\\n\\n![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)\\n\\nThe blog supports tags as well!\\n\\n**And if you don\'t want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config."},{"id":"mdx-blog-post","metadata":{"permalink":"/bpd-reference/blog/mdx-blog-post","source":"@site/blog/2021-08-01-mdx-blog-post.mdx","title":"MDX Blog Post","description":"Blog posts support Docusaurus Markdown features, such as MDX.","date":"2021-08-01T00:00:00.000Z","tags":[{"label":"docusaurus","permalink":"/bpd-reference/blog/tags/docusaurus"}],"readingTime":0.175,"hasTruncateMarker":false,"authors":[{"name":"S\xe9bastien Lorber","title":"Docusaurus maintainer","url":"https://sebastienlorber.com","imageURL":"https://github.com/slorber.png","key":"slorber"}],"frontMatter":{"slug":"mdx-blog-post","title":"MDX Blog Post","authors":["slorber"],"tags":["docusaurus"]},"unlisted":false,"prevItem":{"title":"Welcome","permalink":"/bpd-reference/blog/welcome"},"nextItem":{"title":"Long Blog Post","permalink":"/bpd-reference/blog/long-blog-post"}},"content":"Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).\\n\\n:::tip\\n\\nUse the power of React to create interactive blog posts.\\n\\n```js\\n\\n```\\n\\n\\n\\n:::"},{"id":"long-blog-post","metadata":{"permalink":"/bpd-reference/blog/long-blog-post","source":"@site/blog/2019-05-29-long-blog-post.md","title":"Long Blog Post","description":"This is the summary of a very long blog post,","date":"2019-05-29T00:00:00.000Z","tags":[{"label":"hello","permalink":"/bpd-reference/blog/tags/hello"},{"label":"docusaurus","permalink":"/bpd-reference/blog/tags/docusaurus"}],"readingTime":2.05,"hasTruncateMarker":true,"authors":[{"name":"Endilie Yacop Sucipto","title":"Maintainer of Docusaurus","url":"https://github.com/endiliey","imageURL":"https://github.com/endiliey.png","key":"endi"}],"frontMatter":{"slug":"long-blog-post","title":"Long Blog Post","authors":"endi","tags":["hello","docusaurus"]},"unlisted":false,"prevItem":{"title":"MDX Blog Post","permalink":"/bpd-reference/blog/mdx-blog-post"},"nextItem":{"title":"First Blog Post","permalink":"/bpd-reference/blog/first-blog-post"}},"content":"This is the summary of a very long blog post,\\n\\nUse a `\x3c!--` `truncate` `--\x3e` comment to limit blog post size in the list view.\\n\\n\x3c!--truncate--\x3e\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet\\n\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet"},{"id":"first-blog-post","metadata":{"permalink":"/bpd-reference/blog/first-blog-post","source":"@site/blog/2019-05-28-first-blog-post.md","title":"First Blog Post","description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet","date":"2019-05-28T00:00:00.000Z","tags":[{"label":"hola","permalink":"/bpd-reference/blog/tags/hola"},{"label":"docusaurus","permalink":"/bpd-reference/blog/tags/docusaurus"}],"readingTime":0.12,"hasTruncateMarker":false,"authors":[{"name":"Gao Wei","title":"Docusaurus Core Team","url":"https://github.com/wgao19","image_url":"https://github.com/wgao19.png","imageURL":"https://github.com/wgao19.png"}],"frontMatter":{"slug":"first-blog-post","title":"First Blog Post","authors":{"name":"Gao Wei","title":"Docusaurus Core Team","url":"https://github.com/wgao19","image_url":"https://github.com/wgao19.png","imageURL":"https://github.com/wgao19.png"},"tags":["hola","docusaurus"]},"unlisted":false,"prevItem":{"title":"Long Blog Post","permalink":"/bpd-reference/blog/long-blog-post"}},"content":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet"}]}')}}]); \ No newline at end of file diff --git a/assets/js/6e05dac9.5de02c24.js b/assets/js/6e05dac9.5de02c24.js new file mode 100644 index 00000000..bb27d224 --- /dev/null +++ b/assets/js/6e05dac9.5de02c24.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2284],{6802:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>o,default:()=>p,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var t=s(4848),a=s(8453),r=s(8597);s(8205);const c={sidebar_position:6},o=void 0,d={id:"documentation/accessing-data/df.columns",title:"df.columns",description:"df.columns",source:"@site/docs/documentation/accessing-data/df.columns.md",sourceDirName:"documentation/accessing-data",slug:"/documentation/accessing-data/df.columns",permalink:"/bpd-reference/docs/documentation/accessing-data/df.columns",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/accessing-data/df.columns.md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docsSidebar",previous:{title:"df.index",permalink:"/bpd-reference/docs/documentation/accessing-data/df.index"},next:{title:"df.take()",permalink:"/bpd-reference/docs/documentation/accessing-data/df.take()"}},i={},l=[];function m(e){const n={a:"a",code:"code",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"df.columns"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the column labels of the DataFrame."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Note:"}),(0,t.jsx)("dd",{children:(0,t.jsx)("ul",{children:(0,t.jsxs)("li",{children:["The return type is bpd.Index. Use ",(0,t.jsx)(n.code,{children:"np.array()"})," to convert it to a numpy array."]})})})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets\n"})}),"\n",(0,t.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets_cols = pets.columns\npets_cols\n"})}),"\n",(0,t.jsx)(n.p,{children:"Index(['ID', 'Species', 'Color', 'Weight', 'Age', 'Is_Cat', 'Owner_Comment'], dtype='object')"}),"\n",(0,t.jsxs)("p",{children:[(0,t.jsx)("br",{})," ",(0,t.jsxs)(n.strong,{children:["Convert index to a numpy array. Learn more about this in the ",(0,t.jsx)(n.a,{href:"https://dsc-courses.github.io/bpd-reference/docs/documentation/data%20format%20conversion/np.array()",children:"Data Format Conversion"})," section."]})," "]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"col_arr = np.array(col_lst)\ncol_arr\n"})}),"\n",(0,t.jsx)(n.p,{children:"array(['ID', 'Species', 'Color', 'Weight', 'Age', 'Is_Cat',\n'Owner_Comment'], dtype=object)"})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,n,s)=>{s.d(n,{A:()=>a});s(6540);var t=s(4848);const a=e=>{let{data:n}=e,s=[],a=[],r="",c=[];if(n){const e=JSON.parse(n);s=e.columns||[],a=e.data||[],r=e.indexName||"Index",c=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:r}),s.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:a.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:c[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(s=e,"boolean"==typeof s?s.toString().charAt(0).toUpperCase()+s.toString().slice(1):s)},n);var s}))]},n)))})]})})}},8205:(e,n,s)=>{s.d(n,{A:()=>a});s(6540);var t=s(4848);const a=e=>{let{data:n}=e,s=[],a=[],r="",c="";if(n)try{const e=JSON.parse(n);r=e.name||"",c=e.dtype||"Unknown type",s=e.index||[],a=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const o=a.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,n)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:s[n]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",c]})]})}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>o});var t=s(6540);const a={},r=t.createContext(a);function c(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e05dac9.794051db.js b/assets/js/6e05dac9.794051db.js deleted file mode 100644 index b15b53b0..00000000 --- a/assets/js/6e05dac9.794051db.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2284],{6802:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>o,default:()=>p,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var t=s(4848),a=s(8453),r=s(8597);s(8205);const c={sidebar_position:6},o=void 0,d={id:"documentation/accessing-data/df.columns",title:"df.columns",description:"df.columns",source:"@site/docs/documentation/accessing-data/df.columns.md",sourceDirName:"documentation/accessing-data",slug:"/documentation/accessing-data/df.columns",permalink:"/bpd-reference/docs/documentation/accessing-data/df.columns",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/accessing-data/df.columns.md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docsSidebar",previous:{title:"df.index",permalink:"/bpd-reference/docs/documentation/accessing-data/df.index"},next:{title:"df.take()",permalink:"/bpd-reference/docs/documentation/accessing-data/df.take()"}},i={},l=[];function m(e){const n={a:"a",code:"code",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"df.columns"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the column labels of the DataFrame."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Note:"}),(0,t.jsx)("dd",{children:(0,t.jsx)("ul",{children:(0,t.jsxs)("li",{children:["The return type is bpd.Index. Use ",(0,t.jsx)(n.code,{children:"np.array()"})," to convert it to a numpy array."]})})})]})]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets\n"})}),"\n",(0,t.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets_cols = pets.columns\r\npets_cols\n"})}),"\n",(0,t.jsx)(n.p,{children:"Index(['ID', 'Species', 'Color', 'Weight', 'Age', 'Is_Cat', 'Owner_Comment'], dtype='object')"}),"\n",(0,t.jsxs)("p",{children:[(0,t.jsx)("br",{})," ",(0,t.jsxs)(n.strong,{children:["Convert index to a numpy array. Learn more about this in the ",(0,t.jsx)(n.a,{href:"https://dsc-courses.github.io/bpd-reference/docs/documentation/data%20format%20conversion/np.array()",children:"Data Format Conversion"})," section."]})," "]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"col_arr = np.array(col_lst)\r\ncol_arr\n"})}),"\n",(0,t.jsx)(n.p,{children:"array(['ID', 'Species', 'Color', 'Weight', 'Age', 'Is_Cat',\r\n'Owner_Comment'], dtype=object)"})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,n,s)=>{s.d(n,{A:()=>a});s(6540);var t=s(4848);const a=e=>{let{data:n}=e,s=[],a=[],r="",c=[];if(n){const e=JSON.parse(n);s=e.columns||[],a=e.data||[],r=e.indexName||"Index",c=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:r}),s.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:a.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:c[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(s=e,"boolean"==typeof s?s.toString().charAt(0).toUpperCase()+s.toString().slice(1):s)},n);var s}))]},n)))})]})})}},8205:(e,n,s)=>{s.d(n,{A:()=>a});s(6540);var t=s(4848);const a=e=>{let{data:n}=e,s=[],a=[],r="",c="";if(n)try{const e=JSON.parse(n);r=e.name||"",c=e.dtype||"Unknown type",s=e.index||[],a=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const o=a.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,n)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:s[n]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",c]})]})}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>o});var t=s(6540);const a={},r=t.createContext(a);function c(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e2ca103.12458cb6.js b/assets/js/6e2ca103.7621ee3b.js similarity index 54% rename from assets/js/6e2ca103.12458cb6.js rename to assets/js/6e2ca103.7621ee3b.js index 15114ee5..e90e16f1 100644 --- a/assets/js/6e2ca103.12458cb6.js +++ b/assets/js/6e2ca103.7621ee3b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5980],{3433:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var n=t(4848),a=t(8453);t(8597),t(8205);const i={sidebar_position:1},r=void 0,d={id:"documentation/plotting/Histogram",title:"Histogram",description:"df.plot(kind='hist', y=datacol, bins=thebins, density=True, ec='w')",source:"@site/docs/documentation/plotting/Histogram.md",sourceDirName:"documentation/plotting",slug:"/documentation/plotting/Histogram",permalink:"/bpd-reference/docs/documentation/plotting/Histogram",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/plotting/Histogram.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"Plotting",permalink:"/bpd-reference/docs/documentation/plotting/"},next:{title:"Scatter Plot",permalink:"/bpd-reference/docs/documentation/plotting/Scatter Plot"}},c={},o=[];function l(e){const s={a:"a",code:"code",hr:"hr",img:"img",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("code",{children:"df.plot(kind='hist', y=data_col, bins=the_bins, density=True, ec='w')"}),"\n",(0,n.jsxs)("div",{className:"base",children:[(0,n.jsx)("p",{children:(0,n.jsx)("strong",{children:"Create a histogram using a DataFrame."})}),(0,n.jsxs)("dl",{children:[(0,n.jsx)("dt",{className:"term",children:"Input:"}),(0,n.jsxs)("dd",{className:"parameter",children:["kind : ",(0,n.jsx)("em",{children:"string"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"To create a histogram, use kind='hist'"}),(0,n.jsxs)("dd",{className:"parameter",children:["y : ",(0,n.jsx)("em",{children:"label"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"Column to calculate frequency/probability density."}),(0,n.jsxs)("dd",{className:"parameter",children:["bins : ",(0,n.jsx)("em",{children:"integer or array, default None"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"If integer, number of bins to use."}),(0,n.jsx)("dd",{className:"parameter-description",children:"If array, specifies the bin edges. "}),(0,n.jsx)("dd",{className:"parameter-description",children:"If not specified, matplotlib tries to calculate the optimal number of bins. "}),(0,n.jsxs)("dd",{className:"parameter",children:["density : ",(0,n.jsx)("em",{children:"boolean, default False"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"If False, y-axis plots the number of observations."}),(0,n.jsx)("dd",{className:"parameter-description",children:"If True, y-axis plots the probability density."}),(0,n.jsxs)("dd",{className:"parameter",children:["ec : ",(0,n.jsx)("em",{children:"string"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"Color for histogram bin outlines, use ec='w' for a white outline."}),(0,n.jsx)("dt",{className:"term",children:"Returns:"}),(0,n.jsxs)("dd",{children:["plot - Matplotlib plot created using ",(0,n.jsx)(s.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html",children:"parameters"}),"."]}),(0,n.jsx)("dt",{className:"term",children:"Return Type:"}),(0,n.jsx)("dd",{children:"Matplotlib plot"}),(0,n.jsx)("dt",{className:"term",children:"Note:"}),(0,n.jsx)("dd",{children:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:"In a histogram, only the last bin is inclusive of the right endpoint! [left, right)"}),(0,n.jsx)("li",{children:"The bins you specity don't have to include all data values; data values not in any bin won't be shown in the histogram."})]})})]})]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"pets.plot(kind='hist', y='Age', bins=np.arange(0, 15, 3), density=True, ec='w')\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 1",src:t(7661).A+"",width:"585",height:"413"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"pets.plot(kind='hist', y='Weight', bins=5, density=True, ec='w')\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 2",src:t(246).A+"",width:"585",height:"413"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"# DataFrame with weights of only cats and dogs.\r\ncats_dogs = bpd.DataFrame().assign(\r\n cats=np.array(pets[pets.get('Species') == 'cat'].get('Weight')),\r\n dogs=np.array(pets[pets.get('Species') == 'dog'].get('Weight')),\r\n)\r\n\r\n# Overlaid histogram.\r\nbins = np.arange(0, 40, 15)\r\ncats_dogs.plot(kind='hist', alpha=0.65, density=True, ec='w', bins=bins)\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 3",src:t(8991).A+"",width:"576",height:"418"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"# Without the `bins` parameter.\r\npets.plot(kind='hist', y='Weight', density=True, ec='w')\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 4",src:t(3120).A+"",width:"576",height:"413"})})]})}function p(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>a});t(6540);var n=t(4848);const a=e=>{let{data:s}=e,t=[],a=[],i="",r=[];if(s){const e=JSON.parse(s);t=e.columns||[],a=e.data||[],i=e.indexName||"Index",r=e.index||[]}return(0,n.jsx)("div",{className:"dataframe-container",children:(0,n.jsxs)("table",{className:"dataframe-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:i}),t.map(((e,s)=>(0,n.jsx)("th",{children:e},s)))]})}),(0,n.jsx)("tbody",{children:a.map(((e,s)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"index-value",children:r[s]}),e.map(((e,s)=>{return(0,n.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>a});t(6540);var n=t(4848);const a=e=>{let{data:s}=e,t=[],a=[],i="",r="";if(s)try{const e=JSON.parse(s);i=e.name||"",r=e.dtype||"Unknown type",t=e.index||[],a=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const d=a.map((e=>JSON.stringify(e)));return(0,n.jsxs)("div",{className:"series-container",children:[(0,n.jsx)("ul",{className:"series-list",children:d.map(((e,s)=>(0,n.jsxs)("li",{className:"series-item",children:[(0,n.jsx)("span",{className:"series-index",children:t[s]}),(0,n.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,n.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",r]})]})}},7661:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex1-ca89deede07f4121aaf1ffcdc41ca947.png"},246:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex2-5b2bc1d1349c29bf183a61e69dbe6c3a.png"},8991:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex3-48dc5c40cb3bf5281d80af0c4877ed82.png"},3120:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex4-bc72986eb46b0b82dbdb0509f4c712e5.png"},8453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>d});var n=t(6540);const a={},i=n.createContext(a);function r(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5980],{3433:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>o});var n=t(4848),a=t(8453);t(8597),t(8205);const i={sidebar_position:1},r=void 0,d={id:"documentation/plotting/Histogram",title:"Histogram",description:"df.plot(kind='hist', y=datacol, bins=thebins, density=True, ec='w')",source:"@site/docs/documentation/plotting/Histogram.md",sourceDirName:"documentation/plotting",slug:"/documentation/plotting/Histogram",permalink:"/bpd-reference/docs/documentation/plotting/Histogram",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/plotting/Histogram.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"Plotting",permalink:"/bpd-reference/docs/documentation/plotting/"},next:{title:"Scatter Plot",permalink:"/bpd-reference/docs/documentation/plotting/Scatter Plot"}},c={},o=[];function l(e){const s={a:"a",code:"code",hr:"hr",img:"img",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("code",{children:"df.plot(kind='hist', y=data_col, bins=the_bins, density=True, ec='w')"}),"\n",(0,n.jsxs)("div",{className:"base",children:[(0,n.jsx)("p",{children:(0,n.jsx)("strong",{children:"Create a histogram using a DataFrame."})}),(0,n.jsxs)("dl",{children:[(0,n.jsx)("dt",{className:"term",children:"Input:"}),(0,n.jsxs)("dd",{className:"parameter",children:["kind : ",(0,n.jsx)("em",{children:"string"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"To create a histogram, use kind='hist'"}),(0,n.jsxs)("dd",{className:"parameter",children:["y : ",(0,n.jsx)("em",{children:"label"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"Column to calculate frequency/probability density."}),(0,n.jsxs)("dd",{className:"parameter",children:["bins : ",(0,n.jsx)("em",{children:"integer or array, default None"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"If integer, number of bins to use."}),(0,n.jsx)("dd",{className:"parameter-description",children:"If array, specifies the bin edges. "}),(0,n.jsx)("dd",{className:"parameter-description",children:"If not specified, matplotlib tries to calculate the optimal number of bins. "}),(0,n.jsxs)("dd",{className:"parameter",children:["density : ",(0,n.jsx)("em",{children:"boolean, default False"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"If False, y-axis plots the number of observations."}),(0,n.jsx)("dd",{className:"parameter-description",children:"If True, y-axis plots the probability density."}),(0,n.jsxs)("dd",{className:"parameter",children:["ec : ",(0,n.jsx)("em",{children:"string"})]}),(0,n.jsx)("dd",{className:"parameter-description",children:"Color for histogram bin outlines, use ec='w' for a white outline."}),(0,n.jsx)("dt",{className:"term",children:"Returns:"}),(0,n.jsxs)("dd",{children:["plot - Matplotlib plot created using ",(0,n.jsx)(s.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.html",children:"parameters"}),"."]}),(0,n.jsx)("dt",{className:"term",children:"Return Type:"}),(0,n.jsx)("dd",{children:"Matplotlib plot"}),(0,n.jsx)("dt",{className:"term",children:"Note:"}),(0,n.jsx)("dd",{children:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:"In a histogram, only the last bin is inclusive of the right endpoint! [left, right)"}),(0,n.jsx)("li",{children:"The bins you specity don't have to include all data values; data values not in any bin won't be shown in the histogram."})]})})]})]}),"\n",(0,n.jsx)(s.hr,{}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"pets.plot(kind='hist', y='Age', bins=np.arange(0, 15, 3), density=True, ec='w')\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 1",src:t(1262).A+"",width:"585",height:"413"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"pets.plot(kind='hist', y='Weight', bins=5, density=True, ec='w')\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 2",src:t(3365).A+"",width:"585",height:"413"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"# DataFrame with weights of only cats and dogs.\ncats_dogs = bpd.DataFrame().assign(\n cats=np.array(pets[pets.get('Species') == 'cat'].get('Weight')),\n dogs=np.array(pets[pets.get('Species') == 'dog'].get('Weight')),\n)\n\n# Overlaid histogram.\nbins = np.arange(0, 40, 15)\ncats_dogs.plot(kind='hist', alpha=0.65, density=True, ec='w', bins=bins)\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 3",src:t(476).A+"",width:"576",height:"418"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"# Without the `bins` parameter.\npets.plot(kind='hist', y='Weight', density=True, ec='w')\n"})}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Histogram example 4",src:t(643).A+"",width:"576",height:"413"})})]})}function p(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>a});t(6540);var n=t(4848);const a=e=>{let{data:s}=e,t=[],a=[],i="",r=[];if(s){const e=JSON.parse(s);t=e.columns||[],a=e.data||[],i=e.indexName||"Index",r=e.index||[]}return(0,n.jsx)("div",{className:"dataframe-container",children:(0,n.jsxs)("table",{className:"dataframe-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:i}),t.map(((e,s)=>(0,n.jsx)("th",{children:e},s)))]})}),(0,n.jsx)("tbody",{children:a.map(((e,s)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"index-value",children:r[s]}),e.map(((e,s)=>{return(0,n.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>a});t(6540);var n=t(4848);const a=e=>{let{data:s}=e,t=[],a=[],i="",r="";if(s)try{const e=JSON.parse(s);i=e.name||"",r=e.dtype||"Unknown type",t=e.index||[],a=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const d=a.map((e=>JSON.stringify(e)));return(0,n.jsxs)("div",{className:"series-container",children:[(0,n.jsx)("ul",{className:"series-list",children:d.map(((e,s)=>(0,n.jsxs)("li",{className:"series-item",children:[(0,n.jsx)("span",{className:"series-index",children:t[s]}),(0,n.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,n.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",r]})]})}},1262:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex1-ca89deede07f4121aaf1ffcdc41ca947.png"},3365:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex2-5b2bc1d1349c29bf183a61e69dbe6c3a.png"},476:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex3-48dc5c40cb3bf5281d80af0c4877ed82.png"},643:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/histex4-bc72986eb46b0b82dbdb0509f4c712e5.png"},8453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>d});var n=t(6540);const a={},i=n.createContext(a);function r(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/724.b40f7e36.js b/assets/js/724.b40f7e36.js deleted file mode 100644 index 49e0dde5..00000000 --- a/assets/js/724.b40f7e36.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[724],{9320:function(e,t,n){!function(e,t,n,s){"use strict";const o=0,r=1,i=2,a=3,c=4,l=-1;class u{constructor({file:e,sourceRoot:n}={}){this._names=new t.SetArray,this._sources=new t.SetArray,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=n,this._ignoreList=new t.SetArray}}function h(e){return e}function p(e,t,n,s,o,r,i,a){return b(!1,e,t,n,s,o,r,i,a)}function d(e,t){return N(!1,e,t)}const f=(e,t,n,s,o,r,i,a)=>b(!0,e,t,n,s,o,r,i,a),m=(e,t)=>N(!0,e,t);function k(e,n,s){const{_sources:o,_sourcesContent:r}=h(e);r[t.put(o,n)]=s}function g(e,n,s=!0){const{_sources:o,_sourcesContent:r,_ignoreList:i}=h(e),a=t.put(o,n);a===r.length&&(r[a]=null),s?t.put(i,a):t.remove(i,a)}function x(e){const{_mappings:t,_sources:n,_sourcesContent:s,_names:o,_ignoreList:r}=h(e);return C(t),{version:3,file:e.file||void 0,names:o.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:s,mappings:t,ignoreList:r.array}}function y(e){const t=x(e);return Object.assign(Object.assign({},t),{mappings:n.encode(t.mappings)})}function _(e){const t=new s.TraceMap(e),n=new u({file:t.file,sourceRoot:t.sourceRoot});return A(h(n)._names,t.names),A(h(n)._sources,t.sources),h(n)._sourcesContent=t.sourcesContent||t.sources.map((()=>null)),h(n)._mappings=s.decodedMappings(t),t.ignoreList&&A(h(n)._ignoreList,t.ignoreList),n}function T(e){const t=[],{_mappings:n,_sources:s,_names:l}=h(e);for(let u=0;u =0&&!(t>=e[s][o]);n=s--);return n}function w(e,t,n){for(let s=e.length;s>t;s--)e[s]=e[s-1];e[t]=n}function C(e){const{length:t}=e;let n=t;for(let s=n-1;s>=0&&!(e[s].length>0);n=s,s--);n s&&(s=o)}f(n,s);const o=n.query+n.hash;switch(s){case 2:case 3:return o;case 4:{const s=n.path.slice(1);return s?a(t||e)&&!a(s)?"./"+s+o:s+o:o||"."}case 5:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}return m}()},3534:function(e,t){!function(e){"use strict";class t{constructor(){this._indexes={__proto__:null},this.array=[]}}function n(e){return e}function s(e,t){return n(e)._indexes[t]}function o(e,t){const o=s(e,t);if(void 0!==o)return o;const{array:r,_indexes:i}=n(e),a=r.push(t);return i[t]=a-1}function r(e){const{array:t,_indexes:s}=n(e);0!==t.length&&(s[t.pop()]=void 0)}function i(e,t){const o=s(e,t);if(void 0===o)return;const{array:r,_indexes:i}=n(e);for(let n=o+1;n Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n >>=1,c&&(o=-2147483648|-o),n[s]+=o,t}function u(e,n,s){return!(n>=s)&&e.charCodeAt(n)!==t}function h(e){e.sort(p)}function p(e,t){return e[0]-t[0]}function d(e){const s=new Int32Array(5),o=16384,r=o-36,a=new Uint8Array(o),c=a.subarray(0,r);let l=0,u="";for(let h=0;h 0&&(l===o&&(u+=i.decode(a),l=0),a[l++]=n),0!==p.length){s[0]=0;for(let e=0;e r&&(u+=i.decode(c),a.copyWithin(0,r,l),l-=r),e>0&&(a[l++]=t),l=f(a,l,s,n,0),1!==n.length&&(l=f(a,l,s,n,1),l=f(a,l,s,n,2),l=f(a,l,s,n,3),4!==n.length&&(l=f(a,l,s,n,4)))}}}return u+i.decode(a.subarray(0,l))}function f(e,t,n,s,r){const i=s[r];let a=i-n[r];n[r]=i,a=a<0?-a<<1|1:a<<1;do{let n=31&a;a>>>=5,a>0&&(n|=32),e[t++]=o[n]}while(a>0);return t}e.decode=a,e.encode=d,Object.defineProperty(e,"__esModule",{value:!0})}(t)},2802:function(e,t,n){!function(e,t,n){"use strict";function s(e,t){return t&&!t.endsWith("/")&&(t+="/"),n(e,t)}function o(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}const r=0,i=1,a=2,c=3,l=4,u=1,h=2;function p(e,t){const n=d(e,0);if(n===e.length)return e;t||(e=e.slice());for(let s=n;s >1),i=e[o][r]-t;if(0===i)return g=!0,o;i<0?n=o+1:s=o-1}return g=!1,n-1}function y(e,t,n){for(let s=n+1;s =0&&e[s][r]===t;n=s--);return n}function T(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function b(e,t,n,s){const{lastKey:o,lastNeedle:i,lastIndex:a}=n;let c=0,l=e.length-1;if(s===o){if(t===i)return g=-1!==a&&e[a][r]===t,a;t>=i?c=-1===a?0:a:l=a}return n.lastKey=s,n.lastNeedle=t,n.lastIndex=x(e,t,c,l)}function v(e,t){const n=t.map(w);for(let s=0;s t;s--)e[s]=e[s-1];e[t]=n}function w(){return{__proto__:null}}const C=function(e,t){const n=A(e);if(!("sections"in n))return new P(n,t);const s=[],o=[],r=[],i=[],a=[];return E(n,t,s,o,r,i,a,0,0,1/0,1/0),G({version:3,file:n.file,names:i,sources:o,sourcesContent:r,mappings:s,ignoreList:a})};function A(e){return"string"==typeof e?JSON.parse(e):e}function E(e,t,n,s,o,r,i,a,c,l,u){const{sections:h}=e;for(let p=0;p f)return;const t=j(n,e),s=0===I?d:0,o=_[I];for(let n=0;n =m)return;if(1===u.length){t.push([h]);continue}const p=x+u[i],d=u[a],k=u[c];t.push(4===u.length?[h,p,d,k]:[h,p,d,k,y+u[l]])}}}function N(e,t){for(let n=0;n s(e||"",d)));const{mappings:f}=r;"string"==typeof f?(this._encoded=f,this._decoded=void 0):(this._encoded=void 0,this._decoded=p(f,n)),this._decodedMemo=T(),this._bySources=void 0,this._bySourceMemos=void 0}}function B(e){return e}function q(e){var n,s;return null!==(n=(s=B(e))._encoded)&&void 0!==n?n:s._encoded=t.encode(B(e)._decoded)}function M(e){var n;return(n=B(e))._decoded||(n._decoded=t.decode(B(e)._encoded))}function F(e,t,n){const s=M(e);if(t>=s.length)return null;const o=s[t],r=ee(o,B(e)._decodedMemo,t,n,D);return-1===r?null:o[r]}function $(e,t){let{line:n,column:s,bias:o}=t;if(n--,n<0)throw new Error(R);if(s<0)throw new Error(L);const r=M(e);if(n>=r.length)return Q(null,null,null,null);const u=r[n],h=ee(u,B(e)._decodedMemo,n,s,o||D);if(-1===h)return Q(null,null,null,null);const p=u[h];if(1===p.length)return Q(null,null,null,null);const{names:d,resolvedSources:f}=e;return Q(f[p[i]],p[a]+1,p[c],5===p.length?d[p[l]]:null)}function U(e,t){const{source:n,line:s,column:o,bias:r}=t;return ne(e,n,s,o,r||D,!1)}function K(e,t){const{source:n,line:s,column:o,bias:r}=t;return ne(e,n,s,o,r||O,!0)}function H(e,t){const n=M(e),{names:s,resolvedSources:o}=e;for(let r=0;r {"use strict";n.d(t,{A:()=>S});var s=n(6540),o=n(4848);function r(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),r=t.filter((e=>e!==n)),i=n?.props.children;return{mdxAdmonitionTitle:i,rest:r.length>0?(0,o.jsx)(o.Fragment,{children:r}):null}}(e.children),r=e.title??t;return{...e,...r&&{title:r},children:n}}var i=n(4164),a=n(1312),c=n(7559);const l={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function u(e){let{type:t,className:n,children:s}=e;return(0,o.jsx)("div",{className:(0,i.A)(c.G.common.admonition,c.G.common.admonitionType(t),l.admonition,n),children:s})}function h(e){let{icon:t,title:n}=e;return(0,o.jsxs)("div",{className:l.admonitionHeading,children:[(0,o.jsx)("span",{className:l.admonitionIcon,children:t}),n]})}function p(e){let{children:t}=e;return t?(0,o.jsx)("div",{className:l.admonitionContent,children:t}):null}function d(e){const{type:t,icon:n,title:s,children:r,className:i}=e;return(0,o.jsxs)(u,{type:t,className:i,children:[s||n?(0,o.jsx)(h,{title:s,icon:n}):null,(0,o.jsx)(p,{children:r})]})}function f(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const m={icon:(0,o.jsx)(f,{}),title:(0,o.jsx)(a.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function k(e){return(0,o.jsx)(d,{...m,...e,className:(0,i.A)("alert alert--secondary",e.className),children:e.children})}function g(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const x={icon:(0,o.jsx)(g,{}),title:(0,o.jsx)(a.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function y(e){return(0,o.jsx)(d,{...x,...e,className:(0,i.A)("alert alert--success",e.className),children:e.children})}function _(e){return(0,o.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const T={icon:(0,o.jsx)(_,{}),title:(0,o.jsx)(a.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function b(e){return(0,o.jsx)(d,{...T,...e,className:(0,i.A)("alert alert--info",e.className),children:e.children})}function v(e){return(0,o.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const I={icon:(0,o.jsx)(v,{}),title:(0,o.jsx)(a.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function w(e){return(0,o.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const C={icon:(0,o.jsx)(w,{}),title:(0,o.jsx)(a.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const A={icon:(0,o.jsx)(v,{}),title:(0,o.jsx)(a.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const E={...{note:k,tip:y,info:b,warning:function(e){return(0,o.jsx)(d,{...I,...e,className:(0,i.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,o.jsx)(d,{...C,...e,className:(0,i.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,o.jsx)(k,{title:"secondary",...e}),important:e=>(0,o.jsx)(b,{title:"important",...e}),success:e=>(0,o.jsx)(y,{title:"success",...e}),caution:function(e){return(0,o.jsx)(d,{...A,...e,className:(0,i.A)("alert alert--warning",e.className),children:e.children})}}};function S(e){const t=r(e),n=(s=t.type,E[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),E.info));var s;return(0,o.jsx)(n,{...t})}},4336:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});n(6540);var s=n(4164),o=n(1312),r=n(7559),i=n(8774);const a={iconEdit:"iconEdit_Z9Sw"};var c=n(4848);function l(e){let{className:t,...n}=e;return(0,c.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,s.A)(a.iconEdit,t),"aria-hidden":"true",...n,children:(0,c.jsx)("g",{children:(0,c.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function u(e){let{editUrl:t}=e;return(0,c.jsxs)(i.A,{to:t,className:r.G.common.editThisPage,children:[(0,c.jsx)(l,{}),(0,c.jsx)(o.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var h=n(6266);function p(e){let{lastUpdatedAt:t}=e;const n=new Date(t),s=(0,h.i)({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,c.jsx)(o.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,c.jsx)("b",{children:(0,c.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:s})})},children:" on {date}"})}function d(e){let{lastUpdatedBy:t}=e;return(0,c.jsx)(o.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,c.jsx)("b",{children:t})},children:" by {user}"})}function f(e){let{lastUpdatedAt:t,lastUpdatedBy:n}=e;return(0,c.jsxs)("span",{className:r.G.common.lastUpdated,children:[(0,c.jsx)(o.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t?(0,c.jsx)(p,{lastUpdatedAt:t}):"",byUser:n?(0,c.jsx)(d,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const m={lastUpdated:"lastUpdated_JAkA"};function k(e){let{className:t,editUrl:n,lastUpdatedAt:o,lastUpdatedBy:r}=e;return(0,c.jsxs)("div",{className:(0,s.A)("row",t),children:[(0,c.jsx)("div",{className:"col",children:n&&(0,c.jsx)(u,{editUrl:n})}),(0,c.jsx)("div",{className:(0,s.A)("col",m.lastUpdated),children:(o||r)&&(0,c.jsx)(f,{lastUpdatedAt:o,lastUpdatedBy:r})})]})}},2639:(e,t,n)=>{"use strict";n.d(t,{A:()=>gi});var s=n(6540),o=n(8453),r=n(5260),i=n(4164),a=n(2303),c=n(1765),l={characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};function u(e){var t=window.getSelection();t.empty(),t.addRange(e)}function h(e){return(e.metaKey||e.ctrlKey)&&!e.altKey&&"KeyZ"===e.code}function p(e){e=[e.firstChild];for(var t,n="";t=e.pop();)t.nodeType===Node.TEXT_NODE?n+=t.textContent:t.nodeType===Node.ELEMENT_NODE&&"BR"===t.nodeName&&(n+="\n"),t.nextSibling&&e.push(t.nextSibling),t.firstChild&&e.push(t.firstChild);return"\n"!==n[n.length-1]&&(n+="\n"),n}function d(e){var t=window.getSelection().getRangeAt(0),n=t.collapsed?0:t.toString().length,s=document.createRange();return s.setStart(e,0),s.setEnd(t.startContainer,t.startOffset),{position:e=(s=s.toString()).length,extent:n,content:s=(s=s.split("\n"))[t=s.length-1],line:t}}function f(e,t,n){0>=t&&(t=0),(!n||0>n)&&(n=t);var s=document.createRange();e=[e.firstChild];for(var o,r=0,i=t;o=e[e.length-1];){if(o.nodeType===Node.TEXT_NODE){if(r+o.textContent.length>=i){var a=i-r;if(i===t){if(i=s,a =i){if(i===t){if(a=s,0 ";case k.template:return"template";case k.ellipsis:return"...";case k.backQuote:return"`";case k.dollarBraceL:return"${";case k.at:return"@";case k.hash:return"#";case k.eq:return"=";case k.assign:return"_=";case k.preIncDec:case k.postIncDec:return"++/--";case k.bang:return"!";case k.tilde:return"~";case k.pipeline:return"|>";case k.nullishCoalescing:return"??";case k.logicalOR:return"||";case k.logicalAND:return"&&";case k.bitwiseOR:return"|";case k.bitwiseXOR:return"^";case k.bitwiseAND:return"&";case k.equality:return"==/!=";case k.lessThan:return"<";case k.greaterThan:return">";case k.relationalOrEqual:return"<=/>=";case k.bitShiftL:return"<<";case k.bitShiftR:return">>/>>>";case k.plus:return"+";case k.minus:return"-";case k.modulo:return"%";case k.star:return"*";case k.slash:return"/";case k.exponent:return"**";case k.jsxName:return"jsxName";case k.jsxText:return"jsxText";case k.jsxEmptyText:return"jsxEmptyText";case k.jsxTagStart:return"jsxTagStart";case k.jsxTagEnd:return"jsxTagEnd";case k.typeParameterStart:return"typeParameterStart";case k.nonNullAssertion:return"nonNullAssertion";case k._break:return"break";case k._case:return"case";case k._catch:return"catch";case k._continue:return"continue";case k._debugger:return"debugger";case k._default:return"default";case k._do:return"do";case k._else:return"else";case k._finally:return"finally";case k._for:return"for";case k._function:return"function";case k._if:return"if";case k._return:return"return";case k._switch:return"switch";case k._throw:return"throw";case k._try:return"try";case k._var:return"var";case k._let:return"let";case k._const:return"const";case k._while:return"while";case k._with:return"with";case k._new:return"new";case k._this:return"this";case k._super:return"super";case k._class:return"class";case k._extends:return"extends";case k._export:return"export";case k._import:return"import";case k._yield:return"yield";case k._null:return"null";case k._true:return"true";case k._false:return"false";case k._in:return"in";case k._instanceof:return"instanceof";case k._typeof:return"typeof";case k._void:return"void";case k._delete:return"delete";case k._async:return"async";case k._get:return"get";case k._set:return"set";case k._declare:return"declare";case k._readonly:return"readonly";case k._abstract:return"abstract";case k._static:return"static";case k._public:return"public";case k._private:return"private";case k._protected:return"protected";case k._override:return"override";case k._as:return"as";case k._enum:return"enum";case k._type:return"type";case k._implements:return"implements";default:return""}}(e)}"`)}function U(e="Unexpected token",t=w.start){if(w.error)return;const n=new SyntaxError(e);n.pos=t,w.error=n,w.pos=C.length,ve(k.eof)}const K=[9,11,12,g.space,g.nonBreakingSpace,g.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],H=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,V=new Uint8Array(65536);for(const xi of K)V[xi]=1;function W(e){if(e<48)return 36===e;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return 95===e;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const z=new Uint8Array(65536);for(let xi=0;xi<128;xi++)z[xi]=W(xi)?1:0;for(let xi=128;xi<65536;xi++)z[xi]=1;for(const xi of K)z[xi]=0;z[8232]=0,z[8233]=0;const G=z.slice();for(let xi=g.digit0;xi<=g.digit9;xi++)G[xi]=0;const X=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,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,-1,-1,-1,-1,-1,-1,-1,-1,-1,1+(k._yield<<1),-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);var J,Y;function Q(e){const t=e.identifierRole;return t===J.TopLevelDeclaration||t===J.FunctionScopedDeclaration||t===J.BlockScopedDeclaration||t===J.ObjectShorthandTopLevelDeclaration||t===J.ObjectShorthandFunctionScopedDeclaration||t===J.ObjectShorthandBlockScopedDeclaration}function Z(e){const t=e.identifierRole;return t===J.FunctionScopedDeclaration||t===J.BlockScopedDeclaration||t===J.ObjectShorthandFunctionScopedDeclaration||t===J.ObjectShorthandBlockScopedDeclaration}function ee(e){const t=e.identifierRole;return t===J.TopLevelDeclaration||t===J.ObjectShorthandTopLevelDeclaration||t===J.ImportDeclaration}function te(e){const t=e.identifierRole;return t===J.TopLevelDeclaration||t===J.BlockScopedDeclaration||t===J.ObjectShorthandTopLevelDeclaration||t===J.ObjectShorthandBlockScopedDeclaration}function ne(e){const t=e.identifierRole;return t===J.FunctionScopedDeclaration||t===J.ObjectShorthandFunctionScopedDeclaration}function se(e){return e.identifierRole===J.ObjectShorthandTopLevelDeclaration||e.identifierRole===J.ObjectShorthandBlockScopedDeclaration||e.identifierRole===J.ObjectShorthandFunctionScopedDeclaration}!function(e){e[e.Access=0]="Access";e[e.ExportAccess=1]="ExportAccess";e[e.TopLevelDeclaration=2]="TopLevelDeclaration";e[e.FunctionScopedDeclaration=3]="FunctionScopedDeclaration";e[e.BlockScopedDeclaration=4]="BlockScopedDeclaration";e[e.ObjectShorthandTopLevelDeclaration=5]="ObjectShorthandTopLevelDeclaration";e[e.ObjectShorthandFunctionScopedDeclaration=6]="ObjectShorthandFunctionScopedDeclaration";e[e.ObjectShorthandBlockScopedDeclaration=7]="ObjectShorthandBlockScopedDeclaration";e[e.ObjectShorthand=8]="ObjectShorthand";e[e.ImportDeclaration=9]="ImportDeclaration";e[e.ObjectKey=10]="ObjectKey";e[e.ImportAccess=11]="ImportAccess"}(J||(J={})),function(e){e[e.NoChildren=0]="NoChildren";e[e.OneChild=1]="OneChild";e[e.StaticChildren=2]="StaticChildren";e[e.KeyAfterPropSpread=3]="KeyAfterPropSpread"}(Y||(Y={}));class oe{constructor(){this.type=w.type,this.contextualKeyword=w.contextualKeyword,this.start=w.start,this.end=w.end,this.scopeDepth=w.scopeDepth,this.isType=w.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}}function re(){w.tokens.push(new oe),ye()}function ie(){w.tokens.push(new oe),w.start=w.pos,function(){for(;;){if(w.pos>=C.length)return void U("Unterminated template");const e=C.charCodeAt(w.pos);if(e===g.graveAccent||e===g.dollarSign&&C.charCodeAt(w.pos+1)===g.leftCurlyBrace)return w.pos===w.start&&pe(k.template)?e===g.dollarSign?(w.pos+=2,void ve(k.dollarBraceL)):(++w.pos,void ve(k.backQuote)):void ve(k.template);e===g.backslash&&w.pos++,w.pos++}}()}function ae(){w.type===k.assign&&--w.pos,function(){const e=w.pos;let t=!1,n=!1;for(;;){if(w.pos>=C.length)return void U("Unterminated regular expression",e);const s=C.charCodeAt(w.pos);if(t)t=!1;else{if(s===g.leftSquareBracket)n=!0;else if(s===g.rightSquareBracket&&n)n=!1;else if(s===g.slash&&!n)break;t=s===g.backslash}++w.pos}++w.pos,function(){for(;w.pos =C.length){const e=w.tokens;return e.length>=2&&e[e.length-1].start>=C.length&&e[e.length-2].start>=C.length&&U("Unexpectedly reached the end of input."),void ve(k.eof)}var e;e=C.charCodeAt(w.pos),G[e]||e===g.backslash||e===g.atSign&&C.charCodeAt(w.pos+1)===g.atSign?function(){let e=0,t=0,n=w.pos;for(;n g.lowercaseZ));){const s=X[e+(t-g.lowercaseA)+1];if(-1===s)break;e=s,n++}const s=X[e];if(s>-1&&!z[t])return w.pos=n,void(1&s?ve(s>>>1):ve(k.name,s>>>1));for(;n C.length)return void U("Unterminated comment",w.pos-2);w.pos+=2}function Te(e){let t=C.charCodeAt(w.pos+=e);if(w.pos =g.digit0&&e<=g.digit9?Se(!0):e===g.dot&&C.charCodeAt(w.pos+2)===g.dot?(w.pos+=3,ve(k.ellipsis)):(++w.pos,ve(k.dot))}();case g.leftParenthesis:return++w.pos,void ve(k.parenL);case g.rightParenthesis:return++w.pos,void ve(k.parenR);case g.semicolon:return++w.pos,void ve(k.semi);case g.comma:return++w.pos,void ve(k.comma);case g.leftSquareBracket:return++w.pos,void ve(k.bracketL);case g.rightSquareBracket:return++w.pos,void ve(k.bracketR);case g.leftCurlyBrace:return void(I&&C.charCodeAt(w.pos+1)===g.verticalBar?Ae(k.braceBarL,2):(++w.pos,ve(k.braceL)));case g.rightCurlyBrace:return++w.pos,void ve(k.braceR);case g.colon:return void(C.charCodeAt(w.pos+1)===g.colon?Ae(k.doubleColon,2):(++w.pos,ve(k.colon)));case g.questionMark:return void function(){const e=C.charCodeAt(w.pos+1),t=C.charCodeAt(w.pos+2);e!==g.questionMark||I&&w.isType?e!==g.dot||t>=g.digit0&&t<=g.digit9?(++w.pos,ve(k.question)):(w.pos+=2,ve(k.questionDot)):t===g.equalsTo?Ae(k.assign,3):Ae(k.nullishCoalescing,2)}();case g.atSign:return++w.pos,void ve(k.at);case g.graveAccent:return++w.pos,void ve(k.backQuote);case g.digit0:{const e=C.charCodeAt(w.pos+1);if(e===g.lowercaseX||e===g.uppercaseX||e===g.lowercaseO||e===g.uppercaseO||e===g.lowercaseB||e===g.uppercaseB)return void function(){w.pos+=2;for(;;){const e=C.charCodeAt(w.pos);if(!(e>=g.digit0&&e<=g.digit9||e>=g.lowercaseA&&e<=g.lowercaseF||e>=g.uppercaseA&&e<=g.uppercaseF||e===g.underscore))break;w.pos++}const e=C.charCodeAt(w.pos);e===g.lowercaseN?(++w.pos,ve(k.bigint)):ve(k.num)}()}case g.digit1:case g.digit2:case g.digit3:case g.digit4:case g.digit5:case g.digit6:case g.digit7:case g.digit8:case g.digit9:return void Se(!1);case g.quotationMark:case g.apostrophe:return void function(e){for(w.pos++;;){if(w.pos>=C.length)return void U("Unterminated string constant");const t=C.charCodeAt(w.pos);if(t===g.backslash)w.pos++;else if(t===e)break;w.pos++}w.pos++,ve(k.string)}(e);case g.slash:return void(C.charCodeAt(w.pos+1)===g.equalsTo?Ae(k.assign,2):Ae(k.slash,1));case g.percentSign:case g.asterisk:return void function(e){let t=e===g.asterisk?k.star:k.modulo,n=1,s=C.charCodeAt(w.pos+1);e===g.asterisk&&s===g.asterisk&&(n++,s=C.charCodeAt(w.pos+2),t=k.exponent),s===g.equalsTo&&C.charCodeAt(w.pos+2)!==g.greaterThan&&(n++,t=k.assign),Ae(t,n)}(e);case g.verticalBar:case g.ampersand:return void function(e){const t=C.charCodeAt(w.pos+1);if(t!==e){if(e===g.verticalBar){if(t===g.greaterThan)return void Ae(k.pipeline,2);if(t===g.rightCurlyBrace&&I)return void Ae(k.braceBarR,2)}t!==g.equalsTo?Ae(e===g.verticalBar?k.bitwiseOR:k.bitwiseAND,1):Ae(k.assign,2)}else C.charCodeAt(w.pos+2)===g.equalsTo?Ae(k.assign,3):Ae(e===g.verticalBar?k.logicalOR:k.logicalAND,2)}(e);case g.caret:return void(C.charCodeAt(w.pos+1)===g.equalsTo?Ae(k.assign,2):Ae(k.bitwiseXOR,1));case g.plusSign:case g.dash:return void function(e){const t=C.charCodeAt(w.pos+1);t!==e?t===g.equalsTo?Ae(k.assign,2):e===g.plusSign?Ae(k.plus,1):Ae(k.minus,1):Ae(k.preIncDec,2)}(e);case g.lessThan:return void function(){const e=C.charCodeAt(w.pos+1);if(e===g.lessThan)return C.charCodeAt(w.pos+2)===g.equalsTo?void Ae(k.assign,3):void(w.isType?Ae(k.lessThan,1):Ae(k.bitShiftL,2));e===g.equalsTo?Ae(k.relationalOrEqual,2):Ae(k.lessThan,1)}();case g.greaterThan:return void Ie();case g.equalsTo:case g.exclamationMark:return void function(e){const t=C.charCodeAt(w.pos+1);if(t!==g.equalsTo)return e===g.equalsTo&&t===g.greaterThan?(w.pos+=2,void ve(k.arrow)):void Ae(e===g.equalsTo?k.eq:k.bang,1);Ae(k.equality,C.charCodeAt(w.pos+2)===g.equalsTo?3:2)}(e);case g.tilde:return void Ae(k.tilde,1)}U(`Unexpected character '${String.fromCharCode(e)}'`,w.pos)}function Ae(e,t){w.pos+=t,ve(e)}function Ee(){for(;;){const e=C.charCodeAt(w.pos);if(!(e>=g.digit0&&e<=g.digit9||e===g.underscore))break;w.pos++}}function Se(e){let t=!1,n=!1;e||Ee();let s=C.charCodeAt(w.pos);s===g.dot&&(++w.pos,Ee(),s=C.charCodeAt(w.pos)),s!==g.uppercaseE&&s!==g.lowercaseE||(s=C.charCodeAt(++w.pos),s!==g.plusSign&&s!==g.dash||++w.pos,Ee(),s=C.charCodeAt(w.pos)),s===g.lowercaseN?(++w.pos,t=!0):s===g.lowercaseM&&(++w.pos,n=!0),ve(t?k.bigint:n?k.decimal:k.num)}function Ne(e,t=e.currentIndex()){let n=t+1;if(je(e,n)){const s=e.identifierNameAtIndex(t);return{isType:!1,leftName:s,rightName:s,endIndex:n}}if(n++,je(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,je(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,je(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw new Error(`Unexpected import/export specifier at ${t}`)}function je(e,t){const n=e.tokens[t];return n.type===k.braceR||n.type===k.comma}const Re=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp","\xa0"],["iexcl","\xa1"],["cent","\xa2"],["pound","\xa3"],["curren","\xa4"],["yen","\xa5"],["brvbar","\xa6"],["sect","\xa7"],["uml","\xa8"],["copy","\xa9"],["ordf","\xaa"],["laquo","\xab"],["not","\xac"],["shy","\xad"],["reg","\xae"],["macr","\xaf"],["deg","\xb0"],["plusmn","\xb1"],["sup2","\xb2"],["sup3","\xb3"],["acute","\xb4"],["micro","\xb5"],["para","\xb6"],["middot","\xb7"],["cedil","\xb8"],["sup1","\xb9"],["ordm","\xba"],["raquo","\xbb"],["frac14","\xbc"],["frac12","\xbd"],["frac34","\xbe"],["iquest","\xbf"],["Agrave","\xc0"],["Aacute","\xc1"],["Acirc","\xc2"],["Atilde","\xc3"],["Auml","\xc4"],["Aring","\xc5"],["AElig","\xc6"],["Ccedil","\xc7"],["Egrave","\xc8"],["Eacute","\xc9"],["Ecirc","\xca"],["Euml","\xcb"],["Igrave","\xcc"],["Iacute","\xcd"],["Icirc","\xce"],["Iuml","\xcf"],["ETH","\xd0"],["Ntilde","\xd1"],["Ograve","\xd2"],["Oacute","\xd3"],["Ocirc","\xd4"],["Otilde","\xd5"],["Ouml","\xd6"],["times","\xd7"],["Oslash","\xd8"],["Ugrave","\xd9"],["Uacute","\xda"],["Ucirc","\xdb"],["Uuml","\xdc"],["Yacute","\xdd"],["THORN","\xde"],["szlig","\xdf"],["agrave","\xe0"],["aacute","\xe1"],["acirc","\xe2"],["atilde","\xe3"],["auml","\xe4"],["aring","\xe5"],["aelig","\xe6"],["ccedil","\xe7"],["egrave","\xe8"],["eacute","\xe9"],["ecirc","\xea"],["euml","\xeb"],["igrave","\xec"],["iacute","\xed"],["icirc","\xee"],["iuml","\xef"],["eth","\xf0"],["ntilde","\xf1"],["ograve","\xf2"],["oacute","\xf3"],["ocirc","\xf4"],["otilde","\xf5"],["ouml","\xf6"],["divide","\xf7"],["oslash","\xf8"],["ugrave","\xf9"],["uacute","\xfa"],["ucirc","\xfb"],["uuml","\xfc"],["yacute","\xfd"],["thorn","\xfe"],["yuml","\xff"],["OElig","\u0152"],["oelig","\u0153"],["Scaron","\u0160"],["scaron","\u0161"],["Yuml","\u0178"],["fnof","\u0192"],["circ","\u02c6"],["tilde","\u02dc"],["Alpha","\u0391"],["Beta","\u0392"],["Gamma","\u0393"],["Delta","\u0394"],["Epsilon","\u0395"],["Zeta","\u0396"],["Eta","\u0397"],["Theta","\u0398"],["Iota","\u0399"],["Kappa","\u039a"],["Lambda","\u039b"],["Mu","\u039c"],["Nu","\u039d"],["Xi","\u039e"],["Omicron","\u039f"],["Pi","\u03a0"],["Rho","\u03a1"],["Sigma","\u03a3"],["Tau","\u03a4"],["Upsilon","\u03a5"],["Phi","\u03a6"],["Chi","\u03a7"],["Psi","\u03a8"],["Omega","\u03a9"],["alpha","\u03b1"],["beta","\u03b2"],["gamma","\u03b3"],["delta","\u03b4"],["epsilon","\u03b5"],["zeta","\u03b6"],["eta","\u03b7"],["theta","\u03b8"],["iota","\u03b9"],["kappa","\u03ba"],["lambda","\u03bb"],["mu","\u03bc"],["nu","\u03bd"],["xi","\u03be"],["omicron","\u03bf"],["pi","\u03c0"],["rho","\u03c1"],["sigmaf","\u03c2"],["sigma","\u03c3"],["tau","\u03c4"],["upsilon","\u03c5"],["phi","\u03c6"],["chi","\u03c7"],["psi","\u03c8"],["omega","\u03c9"],["thetasym","\u03d1"],["upsih","\u03d2"],["piv","\u03d6"],["ensp","\u2002"],["emsp","\u2003"],["thinsp","\u2009"],["zwnj","\u200c"],["zwj","\u200d"],["lrm","\u200e"],["rlm","\u200f"],["ndash","\u2013"],["mdash","\u2014"],["lsquo","\u2018"],["rsquo","\u2019"],["sbquo","\u201a"],["ldquo","\u201c"],["rdquo","\u201d"],["bdquo","\u201e"],["dagger","\u2020"],["Dagger","\u2021"],["bull","\u2022"],["hellip","\u2026"],["permil","\u2030"],["prime","\u2032"],["Prime","\u2033"],["lsaquo","\u2039"],["rsaquo","\u203a"],["oline","\u203e"],["frasl","\u2044"],["euro","\u20ac"],["image","\u2111"],["weierp","\u2118"],["real","\u211c"],["trade","\u2122"],["alefsym","\u2135"],["larr","\u2190"],["uarr","\u2191"],["rarr","\u2192"],["darr","\u2193"],["harr","\u2194"],["crarr","\u21b5"],["lArr","\u21d0"],["uArr","\u21d1"],["rArr","\u21d2"],["dArr","\u21d3"],["hArr","\u21d4"],["forall","\u2200"],["part","\u2202"],["exist","\u2203"],["empty","\u2205"],["nabla","\u2207"],["isin","\u2208"],["notin","\u2209"],["ni","\u220b"],["prod","\u220f"],["sum","\u2211"],["minus","\u2212"],["lowast","\u2217"],["radic","\u221a"],["prop","\u221d"],["infin","\u221e"],["ang","\u2220"],["and","\u2227"],["or","\u2228"],["cap","\u2229"],["cup","\u222a"],["int","\u222b"],["there4","\u2234"],["sim","\u223c"],["cong","\u2245"],["asymp","\u2248"],["ne","\u2260"],["equiv","\u2261"],["le","\u2264"],["ge","\u2265"],["sub","\u2282"],["sup","\u2283"],["nsub","\u2284"],["sube","\u2286"],["supe","\u2287"],["oplus","\u2295"],["otimes","\u2297"],["perp","\u22a5"],["sdot","\u22c5"],["lceil","\u2308"],["rceil","\u2309"],["lfloor","\u230a"],["rfloor","\u230b"],["lang","\u2329"],["rang","\u232a"],["loz","\u25ca"],["spades","\u2660"],["clubs","\u2663"],["hearts","\u2665"],["diams","\u2666"]]);function Le(e){const[t,n]=Oe(e.jsxPragma||"React.createElement"),[s,o]=Oe(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:n,fragmentBase:s,fragmentSuffix:o}}function Oe(e){let t=e.indexOf(".");return-1===t&&(t=e.length),[e.slice(0,t),e.slice(t)]}class De{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}class Pe extends De{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(e,t,n,s,o){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.nameManager=s,this.options=o,Pe.prototype.__init.call(this),Pe.prototype.__init2.call(this),Pe.prototype.__init3.call(this),Pe.prototype.__init4.call(this),Pe.prototype.__init5.call(this),this.jsxPragmaInfo=Le(o),this.isAutomaticRuntime="automatic"===o.jsxRuntime,this.jsxImportSource=o.jsxImportSource||"react"}process(){return!!this.tokens.matches1(k.jsxTagStart)&&(this.processJSXTag(),!0)}getPrefixCode(){let e="";if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(const[t,n]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${n} = require("${t}");`;else{const{createElement:t,...n}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);const s=Object.entries(n).map((([e,t])=>`${e} as ${t}`)).join(", ");if(s){e+=`import {${s}} from "${this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime")}";`}}return e}processJSXTag(){const{jsxRole:e,start:t}=this.tokens.currentToken(),n=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==Y.KeyAfterPropSpread?this.transformTagToJSXFunc(n,e):this.transformTagToCreateElement(n)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){const t=this.tokens.code;for(;this.lastIndex or > at the end of the tag.");this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t)}s&&this.tokens.appendCode(`, ${s}`)}for(this.options.production||(null===s&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${n}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(k.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(k.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),this.tokens.matches2(k.slash,k.jsxTagEnd));else{if(!this.tokens.matches1(k.jsxTagEnd))throw new Error("Expected either /> or > at the end of the tag.");this.tokens.removeToken(),this.processChildren(!0)}for(this.tokens.removeInitialToken();!this.tokens.matches1(k.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{const{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{const{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){const n=this.claimAutoImportedName(e,t);return this.importProcessor?`${n}.call(void 0, `:`${n}(`}claimAutoImportedName(e,t){if(this.importProcessor){const n=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[n]||(this.cjsAutomaticModuleNameResolutions[n]=this.importProcessor.getFreeIdentifierForPath(n)),`${this.cjsAutomaticModuleNameResolutions[n]}.${e}`}return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,k.jsxName,k.jsxName)&&!this.tokens.matches2AtIndex(e-1,k.greaterThan,k.jsxName)&&!this.tokens.matches1AtIndex(e,k.braceL)&&!this.tokens.matches1AtIndex(e,k.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,k.slash,k.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){const e=this.tokens.identifierName();Be(e)&&this.tokens.replaceToken(`'${e}'`)}for(;this.tokens.currentIndex() =g.lowercaseA&&t<=g.lowercaseZ}function qe(e){let t=0,n=0;for(const s of e)"\n"===s?(t++,n=0):" "===s&&n++;return"\n".repeat(t)+" ".repeat(n)}function Me(e,t){let n,s="",o=0,r=t;if("#"===e[r]){let t,s=10;if(r++,"x"===e[r])for(s=16,r++,t=r;r =g.digit0&&i<=g.digit9||i>=g.lowercaseA&&i<=g.lowercaseF||i>=g.uppercaseA&&i<=g.uppercaseF);)r++;else for(t=r;r =g.digit0&&e<=g.digit9}function $e(e,t){const n=Le(t),s=new Set;for(let o=0;o 0||t.namedExports.length>0)continue;[...t.defaultNames,...t.wildcardNames,...t.namedImports.map((({localName:e})=>e))].every((e=>this.shouldAutomaticallyElideImportedName(e)))&&this.importsToReplace.set(e,"")}}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(const[e,t]of this.importInfoByPath.entries()){const{defaultNames:n,wildcardNames:s,namedImports:o,namedExports:r,exportStarNames:i,hasStarExport:a}=t;if(0===n.length&&0===s.length&&0===o.length&&0===r.length&&0===i.length&&!a){this.importsToReplace.set(e,`require('${e}');`);continue}const c=this.getFreeIdentifierForPath(e);let l;l=this.enableLegacyTypeScriptModuleInterop?c:s.length>0?s[0]:this.getFreeIdentifierForPath(e);let u=`var ${c} = require('${e}');`;if(s.length>0)for(const e of s){u+=` var ${e} = ${this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName("interopRequireWildcard")}(${c})`};`}else i.length>0&&l!==c?u+=` var ${l} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${c});`:n.length>0&&l!==c&&(u+=` var ${l} = ${this.helperManager.getHelperName("interopRequireDefault")}(${c});`);for(const{importedName:e,localName:t}of r)u+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${c}, '${t}', '${e}');`;for(const e of i)u+=` exports.${e} = ${l};`;a&&(u+=` ${this.helperManager.getHelperName("createStarExport")}(${c});`),this.importsToReplace.set(e,u);for(const e of n)this.identifierReplacements.set(e,`${l}.default`);for(const{importedName:e,localName:t}of o)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){const t=e.split("/"),n=t[t.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){const t=[],n=[],s=[];if(e++,(this.tokens.matchesContextualAtIndex(e,m._type)||this.tokens.matches1AtIndex(e,k._typeof))&&!this.tokens.matches1AtIndex(e+1,k.comma)&&!this.tokens.matchesContextualAtIndex(e+1,m._from))return;if(this.tokens.matches1AtIndex(e,k.parenL))return;if(this.tokens.matches1AtIndex(e,k.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,k.comma)&&e++),this.tokens.matches1AtIndex(e,k.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,k.braceL)){const n=this.getNamedImports(e+1);e=n.newIndex;for(const e of n.namedImports)"default"===e.importedName?t.push(e.localName):s.push(e)}if(this.tokens.matchesContextualAtIndex(e,m._from)&&e++,!this.tokens.matches1AtIndex(e,k.string))throw new Error("Expected string token at the end of import statement.");const o=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(o);r.defaultNames.push(...t),r.wildcardNames.push(...n),r.namedImports.push(...s),0===t.length&&0===n.length&&0===s.length&&(r.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,k._export,k._var)||this.tokens.matches2AtIndex(e,k._export,k._let)||this.tokens.matches2AtIndex(e,k._export,k._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,k._export,k._function)||this.tokens.matches2AtIndex(e,k._export,k._class)){const t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,k._export,k.name,k._function)){const t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,k._export,k.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,k._export,k.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,k.braceL)||this.tokens.matches1AtIndex(n,k.dollarBraceL)||this.tokens.matches1AtIndex(n,k.bracketL))t++;else if(this.tokens.matches1AtIndex(n,k.braceR)||this.tokens.matches1AtIndex(n,k.bracketR))t--;else{if(0===t&&!this.tokens.matches1AtIndex(n,k.name))break;if(this.tokens.matches1AtIndex(1,k.eq)){const e=this.tokens.currentToken().rhsEndIndex;if(null==e)throw new Error("Expected = token with an end index.");n=e-1}else{if(Q(this.tokens.tokens[n])){const e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}}preprocessNamedExportAtIndex(e){e+=2;const{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,!this.tokens.matchesContextualAtIndex(e,m._from)){for(const{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(e++,!this.tokens.matches1AtIndex(e,k.string))throw new Error("Expected string token at the end of import statement.");const s=this.tokens.stringValueAtIndex(e);this.getImportInfo(s).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,k._export,k.star,k._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,k.string))throw new Error("Expected string token at the end of star export statement.");const n=this.tokens.stringValueAtIndex(e),s=this.getImportInfo(n);null!==t?s.exportStarNames.push(t):s.hasStarExport=!0}getNamedImports(e){const t=[];for(;;){if(this.tokens.matches1AtIndex(e,k.braceR)){e++;break}const n=Ne(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,k.comma,k.braceR)){e+=2;break}if(this.tokens.matches1AtIndex(e,k.braceR)){e++;break}if(!this.tokens.matches1AtIndex(e,k.comma))throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`);e++}return{newIndex:e,namedImports:t}}getImportInfo(e){const t=this.importInfoByPath.get(e);if(t)return t;const n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){const t=this.importsToReplace.get(e);return this.importsToReplace.set(e,""),t||""}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){const t=this.exportBindingsByLocalName.get(e);return t&&0!==t.length?t.map((e=>`exports.${e}`)).join(" = "):null}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}var Ke=n(9320);function He({code:e,mappings:t},n,s,o,r){const i=function(e,t){const n=new Array(t.length);let s=0,o=t[s].start,r=0;for(let i=0;i obj[importedName]});\n }\n ",createStarExport:'\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n ',nullishCoalesce:"\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n ",asyncNullishCoalesce:"\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n ",optionalChain:"\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n ",asyncOptionalChain:"\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n return undefined;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n ",optionalChainDelete:"\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n ",asyncOptionalChainDelete:"\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n "};class We{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(e){this.nameManager=e,We.prototype.__init.call(this),We.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(const[t,n]of Object.entries(Ve)){const s=this.helperNames[t];let o=n;"optionalChainDelete"===t?o=o.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):"asyncOptionalChainDelete"===t?o=o.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):"require"===t&&(null===this.createRequireName&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),o=o.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),s&&(e+=" ",e+=o.replace(t,s).replace(/\s+/g," ").trim())}return e}}function ze(e,t,n){(function(e,t){for(const n of e.tokens)if(n.type===k.name&&!n.isType&&Z(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1})(e,n)&&function(e,t,n){const s=[];let o=t.length-1;for(let r=e.tokens.length-1;;r--){for(;s.length>0&&s[s.length-1].startTokenIndex===r+1;)s.pop();for(;o>=0&&t[o].endTokenIndex===r+1;)s.push(t[o]),o--;if(r<0)break;const i=e.tokens[r],a=e.identifierNameForToken(i);if(s.length>1&&!i.isType&&i.type===k.name&&n.has(a))if(te(i))Ge(s[s.length-1],e,a);else if(ne(i)){let t=s.length-1;for(;t>0&&!s[t].isFunctionScope;)t--;if(t<0)throw new Error("Did not find parent function scope.");Ge(s[t],e,a)}}if(s.length>0)throw new Error("Expected empty scope stack after processing file.")}(e,t,n)}function Ge(e,t,n){for(let s=e.startTokenIndex;s 0&&!w.error;)pe(k.braceL)||pe(k.bracketL)?e++:(pe(k.braceR)||pe(k.bracketR))&&e--,re();return!0}return!1}()){if(pe(k.colon)||pe(k.comma)||pe(k.question)||pe(k.eq))return!0;if(pe(k.parenR)&&(re(),pe(k.arrow)))return!0}return!1}();return w.restoreFromSnapshot(e),t}()}function Ot(e){const t=ce(0);$(e);(function(){const e=w.snapshot();if(R(m._asserts))return re(),O(m._is)?(Bt(),!0):lt()||pe(k._this)?(re(),O(m._is)&&Bt(),!0):(w.restoreFromSnapshot(e),!1);if(lt()||pe(k._this))return re(),R(m._is)&&!B()?(re(),Bt(),!0):(w.restoreFromSnapshot(e),!1);return!1})()||Bt(),le(t)}function Dt(){pe(k.colon)&&Pt()}function Pt(){const e=ce(0);$(k.colon),Bt(),le(e)}function Bt(){if(qt(),w.inDisallowConditionalTypesContext||B()||!ue(k._extends))return;const e=w.inDisallowConditionalTypesContext;w.inDisallowConditionalTypesContext=!0,qt(),w.inDisallowConditionalTypesContext=e,$(k.question),Bt(),$(k.colon),Bt()}function qt(){Lt()?St(Et.TSFunctionType):pe(k._new)?St(Et.TSConstructorType):R(m._abstract)&&de()===k._new?St(Et.TSAbstractConstructorType):function(){if(ue(k.bitwiseOR),Rt(),pe(k.bitwiseOR))for(;ue(k.bitwiseOR);)Rt()}()}function Mt(){for(;!pe(k.braceL)&&!w.error;)Ft(),ue(k.comma)}function Ft(){dt(),pe(k.lessThan)&&Zt()}function $t(){if(pe(k.string)?Sn():Vn(),ue(k.eq)){const e=w.tokens.length-1;fn(),w.tokens[e].rhsEndIndex=w.tokens.length}}function Ut(){for(tt(!1),$(k.braceL);!ue(k.braceR)&&!w.error;)$t(),ue(k.comma)}function Kt(){$(k.braceL),Ns(k.braceR)}function Ht(){tt(!1),ue(k.dot)?Ht():Kt()}function Vt(){R(m._global)?Vn():pe(k.string)?An():U(),pe(k.braceL)?Kt():F()}function Wt(){nt(),$(k.eq),R(m._require)&&de()===k.parenL?(D(m._require),$(k.parenL),pe(k.string)||U(),Sn(),$(k.parenR)):dt(),F()}function zt(){return Xt(w.contextualKeyword,!0)}function Gt(e){switch(e){case m._declare:{const e=w.tokens.length-1,t=function(){if(M())return!1;switch(w.type){case k._function:{const e=ce(1);return re(),Ds(w.start,!0),le(e),!0}case k._class:{const e=ce(1);return Bs(!0,!1),le(e),!0}case k._const:if(pe(k._const)&&L(m._enum)){const e=ce(1);return $(k._const),D(m._enum),w.tokens[w.tokens.length-1].type=k._enum,Ut(),le(e),!0}case k._var:case k._let:{const e=ce(1);return Es(w.type!==k._var),le(e),!0}case k.name:{const e=ce(1),t=w.contextualKeyword;let n=!1;return t===m._global?(Vt(),n=!0):n=Xt(t,!0),le(e),n}default:return!1}}();if(t)return w.tokens[e].type=k._declare,!0;break}case m._global:if(pe(k.braceL))return Kt(),!0;break;default:return Xt(e,!1)}return!1}function Xt(e,t){switch(e){case m._abstract:if(Jt(t)&&pe(k._class))return w.tokens[w.tokens.length-1].type=k._abstract,Bs(!0,!1),!0;break;case m._enum:if(Jt(t)&&pe(k.name))return w.tokens[w.tokens.length-1].type=k._enum,Ut(),!0;break;case m._interface:if(Jt(t)&&pe(k.name)){const e=ce(t?2:1);return tt(!1),kt(),ue(k._extends)&&Mt(),It(),le(e),!0}break;case m._module:if(Jt(t)){if(pe(k.string)){const e=ce(t?2:1);return Vt(),le(e),!0}if(pe(k.name)){const e=ce(t?2:1);return Ht(),le(e),!0}}break;case m._namespace:if(Jt(t)&&pe(k.name)){const e=ce(t?2:1);return Ht(),le(e),!0}break;case m._type:if(Jt(t)&&pe(k.name)){const e=ce(t?2:1);return tt(!1),kt(),$(k.eq),Bt(),F(),le(e),!0}}return!1}function Jt(e){return e?(re(),!0):!M()}function Yt(){const e=w.snapshot();return gt(),Ps(),pe(k.colon)&&Ot(k.colon),$(k.arrow),w.error?(w.restoreFromSnapshot(e),!1):(Un(!0),!0)}function Qt(){w.type===k.bitShiftL&&(w.pos-=1,ve(k.lessThan)),Zt()}function Zt(){const e=ce(0);for($(k.lessThan);!pe(k.greaterThan)&&!w.error;)Bt(),ue(k.comma);e?($(k.greaterThan),le(e)):(le(e),we(),$(k.greaterThan),w.tokens[w.tokens.length-1].isType=!0)}function en(){if(pe(k.name))switch(w.contextualKeyword){case m._abstract:case m._declare:case m._enum:case m._interface:case m._module:case m._namespace:case m._type:return!0}return!1}function tn(e,t){return b?function(e,t){if(!pe(k.lessThan))return mn(e,t);const n=w.snapshot();let s=mn(e,t);if(!w.error)return s;w.restoreFromSnapshot(n);w.type=k.typeParameterStart,gt(),s=mn(e,t),s||U();return s}(e,t):function(e,t){if(!pe(k.lessThan))return mn(e,t);const n=w.snapshot();gt();const s=mn(e,t);s||U();if(!w.error)return s;w.restoreFromSnapshot(n);return mn(e,t)}(e,t)}function nn(){un()}function sn(e){nn(),ue(k.colon)?nn():w.tokens[w.tokens.length-1].identifierRole=e}function on(){const e=w.tokens.length;sn(J.Access);let t=!1;for(;pe(k.dot);)t=!0,un(),nn();if(!t){const t=w.tokens[e],n=C.charCodeAt(t.start);n>=g.lowercaseA&&n<=g.lowercaseZ&&(t.identifierRole=null)}}function rn(){switch(w.type){case k.braceL:return re(),dn(),void un();case k.jsxTagStart:return ln(),void un();case k.string:return void un();default:U("JSX value should be either an expression or a quoted JSX text")}}function an(e){if(pe(k.jsxTagEnd))return!1;on(),v&&function(){if(ue(k.jsxTagStart)){w.tokens[w.tokens.length-1].type=k.typeParameterStart;const e=ce(1);for(;!pe(k.greaterThan)&&!w.error;)Bt(),ue(k.comma);un(),le(e)}}();let t=!1;for(;!pe(k.slash)&&!pe(k.jsxTagEnd)&&!w.error;)ue(k.braceL)?(t=!0,$(k.ellipsis),fn(),un()):(t&&w.end-w.start==3&&C.charCodeAt(w.start)===g.lowercaseK&&C.charCodeAt(w.start+1)===g.lowercaseE&&C.charCodeAt(w.start+2)===g.lowercaseY&&(w.tokens[e].jsxRole=Y.KeyAfterPropSpread),sn(J.ObjectKey),pe(k.eq)&&(un(),rn()));const n=pe(k.slash);return n&&un(),n}function cn(){const e=w.tokens.length-1;w.tokens[e].jsxRole=Y.NoChildren;let t=0;if(!an(e))for(hn();;)switch(w.type){case k.jsxTagStart:if(un(),pe(k.slash))return un(),pe(k.jsxTagEnd)||on(),void(w.tokens[e].jsxRole!==Y.KeyAfterPropSpread&&(1===t?w.tokens[e].jsxRole=Y.OneChild:t>1&&(w.tokens[e].jsxRole=Y.StaticChildren)));t++,cn(),hn();break;case k.jsxText:t++,hn();break;case k.jsxEmptyText:hn();break;case k.braceL:re(),pe(k.ellipsis)?($(k.ellipsis),dn(),hn(),t+=2):(pe(k.braceR)||(t++,dn()),hn());break;default:return void U()}}function ln(){un(),cn()}function un(){w.tokens.push(new oe),be(),w.start=w.pos;const e=C.charCodeAt(w.pos);if(G[e])!function(){let e;do{if(w.pos>C.length)return void U("Unexpectedly reached the end of input.");e=C.charCodeAt(++w.pos)}while(z[e]||e===g.dash);ve(k.jsxName)}();else if(e===g.quotationMark||e===g.apostrophe)!function(e){for(w.pos++;;){if(w.pos>=C.length)return void U("Unterminated string constant");if(C.charCodeAt(w.pos)===e){w.pos++;break}w.pos++}ve(k.string)}(e);else switch(++w.pos,e){case g.greaterThan:ve(k.jsxTagEnd);break;case g.lessThan:ve(k.jsxTagStart);break;case g.slash:ve(k.slash);break;case g.equalsTo:ve(k.eq);break;case g.leftCurlyBrace:ve(k.braceL);break;case g.dot:ve(k.dot);break;case g.colon:ve(k.colon);break;default:U()}}function hn(){w.tokens.push(new oe),w.start=w.pos,function(){let e=!1,t=!1;for(;;){if(w.pos>=C.length)return void U("Unterminated JSX contents");const n=C.charCodeAt(w.pos);if(n===g.lessThan||n===g.leftCurlyBrace)return w.pos===w.start?n===g.lessThan?(w.pos++,void ve(k.jsxTagStart)):void Ce(n):void ve(e&&!t?k.jsxEmptyText:k.jsxText);n===g.lineFeed?e=!0:n!==g.space&&n!==g.carriageReturn&&n!==g.tab&&(t=!0),w.pos++}}()}!function(e){e[e.TSFunctionType=0]="TSFunctionType";e[e.TSConstructorType=1]="TSConstructorType";e[e.TSAbstractConstructorType=2]="TSAbstractConstructorType"}(Et||(Et={}));class pn{constructor(e){this.stop=e}}function dn(e=!1){if(fn(e),pe(k.comma))for(;ue(k.comma);)fn(e)}function fn(e=!1,t=!1){return v?tn(e,t):I?function(e,t){if(pe(k.lessThan)){const n=w.snapshot();let s=mn(e,t);if(!w.error)return s;w.restoreFromSnapshot(n),w.type=k.typeParameterStart;const o=ce(0);if(ns(),le(o),s=mn(e,t),s)return!0;U()}return mn(e,t)}(e,t):mn(e,t)}function mn(e,t){if(pe(k._yield))return re(),pe(k.semi)||P()||(ue(k.star),fn()),!1;(pe(k.parenL)||pe(k.name)||pe(k._yield))&&(w.potentialArrowAt=w.start);const n=function(e){const t=function(e){const t=w.tokens.length,n=xn();if(n)return!0;return gn(t,-1,e),!1}(e);if(t)return!0;return function(e){v||I?function(e){if(pe(k.question)){const e=de();if(e===k.colon||e===k.comma||e===k.parenR)return}kn(e)}(e):kn(e)}(e),!1}(e);return t&&Ln(),w.type&k.IS_ASSIGN?(re(),fn(e),!1):n}function kn(e){ue(k.question)&&(fn(),$(k.colon),fn(e))}function gn(e,t,n){if(v&&(k._in&k.PRECEDENCE_MASK)>t&&!B()&&(O(m._as)||O(m._satisfies))){const s=ce(1);return Bt(),le(s),we(),void gn(e,t,n)}const s=w.type&k.PRECEDENCE_MASK;if(s>0&&(!n||!pe(k._in))&&s>t){const o=w.type;re(),o===k.nullishCoalescing&&(w.tokens[w.tokens.length-1].nullishStartIndex=e);const r=w.tokens.length;xn(),gn(r,o&k.IS_RIGHT_ASSOCIATIVE?s-1:s,n),o===k.nullishCoalescing&&(w.tokens[e].numNullishCoalesceStarts++,w.tokens[w.tokens.length-1].numNullishCoalesceEnds++),gn(e,t,n)}}function xn(){if(v&&!b&&ue(k.lessThan))return function(){const e=ce(1);Bt(),$(k.greaterThan),le(e),xn()}(),!1;if(R(m._module)&&xe()===g.leftCurlyBrace&&!q())return D(m._module),$(k.braceL),Ns(k.braceR),!1;if(w.type&k.IS_PREFIX)return re(),xn(),!1;if(yn())return!0;for(;w.type&k.IS_POSTFIX&&!P();)w.type===k.preIncDec&&(w.type=k.postIncDec),re();return!1}function yn(){const e=w.tokens.length;return!!An()||(_n(e),w.tokens.length>e&&w.tokens[e].isOptionalChainStart&&(w.tokens[w.tokens.length-1].isOptionalChainEnd=!0),!1)}function _n(e,t=!1){I?function(e,t=!1){if(w.tokens[w.tokens.length-1].contextualKeyword===m._async&&pe(k.lessThan)){const e=w.snapshot(),t=function(){w.scopeDepth++;const e=w.tokens.length;if(Ps(),!Rn())return!1;return Fn(e),!0}();if(t&&!w.error)return;w.restoreFromSnapshot(e)}Tn(e,t)}(e,t):Tn(e,t)}function Tn(e,t=!1){const n=new pn(!1);do{bn(e,t,n)}while(!n.stop&&!w.error)}function bn(e,t,n){v?function(e,t,n){if(B()||!ue(k.bang)){if(pe(k.lessThan)||pe(k.bitShiftL)){const n=w.snapshot();if(!t&&In()&&Yt())return;if(Qt(),!t&&ue(k.parenL)?(w.tokens[w.tokens.length-1].subscriptStartIndex=e,wn()):pe(k.backQuote)?On():(w.type===k.greaterThan||w.type!==k.parenL&&Boolean(w.type&k.IS_EXPRESSION_START)&&!B())&&U(),!w.error)return;w.restoreFromSnapshot(n)}else!t&&pe(k.questionDot)&&de()===k.lessThan&&(re(),w.tokens[e].isOptionalChainStart=!0,w.tokens[w.tokens.length-1].subscriptStartIndex=e,Zt(),$(k.parenL),wn());vn(e,t,n)}else w.tokens[w.tokens.length-1].type=k.nonNullAssertion}(e,t,n):I?function(e,t,n){if(pe(k.questionDot)&&de()===k.lessThan)return t?void(n.stop=!0):(re(),ss(),$(k.parenL),void wn());if(!t&&pe(k.lessThan)){const e=w.snapshot();if(ss(),$(k.parenL),wn(),!w.error)return;w.restoreFromSnapshot(e)}vn(e,t,n)}(e,t,n):vn(e,t,n)}function vn(e,t,n){if(!t&&ue(k.doubleColon))Cn(),n.stop=!0,_n(e,t);else if(pe(k.questionDot)){if(w.tokens[e].isOptionalChainStart=!0,t&&de()===k.parenL)return void(n.stop=!0);re(),w.tokens[w.tokens.length-1].subscriptStartIndex=e,ue(k.bracketL)?(dn(),$(k.bracketR)):ue(k.parenL)?wn():En()}else if(ue(k.dot))w.tokens[w.tokens.length-1].subscriptStartIndex=e,En();else if(ue(k.bracketL))w.tokens[w.tokens.length-1].subscriptStartIndex=e,dn(),$(k.bracketR);else if(!t&&pe(k.parenL))if(In()){const t=w.snapshot(),s=w.tokens.length;re(),w.tokens[w.tokens.length-1].subscriptStartIndex=e;const o=E();w.tokens[w.tokens.length-1].contextId=o,wn(),w.tokens[w.tokens.length-1].contextId=o,(pe(k.colon)||pe(k.arrow))&&(w.restoreFromSnapshot(t),n.stop=!0,w.scopeDepth++,Ps(),function(e){v?pe(k.colon)&&Pt():I&&function(){if(pe(k.colon)){const e=w.noAnonFunctionType;w.noAnonFunctionType=!0,gs(),w.noAnonFunctionType=e}}();$(k.arrow),Fn(e)}(s))}else{re(),w.tokens[w.tokens.length-1].subscriptStartIndex=e;const t=E();w.tokens[w.tokens.length-1].contextId=t,wn(),w.tokens[w.tokens.length-1].contextId=t}else pe(k.backQuote)?On():n.stop=!0}function In(){return w.tokens[w.tokens.length-1].contextualKeyword===m._async&&!P()}function wn(){let e=!0;for(;!ue(k.parenR)&&!w.error;){if(e)e=!1;else if($(k.comma),ue(k.parenR))break;Hn(!1)}}function Cn(){const e=w.tokens.length;An(),_n(e,!0)}function An(){if(ue(k.modulo))return Vn(),!1;if(pe(k.jsxText)||pe(k.jsxEmptyText))return Sn(),!1;if(pe(k.lessThan)&&b)return w.type=k.jsxTagStart,ln(),re(),!1;const e=w.potentialArrowAt===w.start;switch(w.type){case k.slash:case k.assign:ae();case k._super:case k._this:case k.regexp:case k.num:case k.bigint:case k.decimal:case k.string:case k._null:case k._true:case k._false:return re(),!1;case k._import:return re(),pe(k.dot)&&(w.tokens[w.tokens.length-1].type=k.name,re(),Vn()),!1;case k.name:{const t=w.tokens.length,n=w.start,s=w.contextualKeyword;return Vn(),s===m._await?(xn(),!1):s===m._async&&pe(k._function)&&!P()?(re(),Ds(n,!1),!1):e&&s===m._async&&!P()&&pe(k.name)?(w.scopeDepth++,tt(!1),$(k.arrow),Fn(t),!0):pe(k._do)&&!P()?(re(),Ss(),!1):e&&!P()&&pe(k.arrow)?(w.scopeDepth++,st(!1),$(k.arrow),Fn(t),!0):(w.tokens[w.tokens.length-1].identifierRole=J.Access,!1)}case k._do:return re(),Ss(),!1;case k.parenL:return jn(e);case k.bracketL:return re(),Kn(k.bracketR,!0),!1;case k.braceL:return Dn(!1,!1),!1;case k._function:return function(){const e=w.start;Vn(),ue(k.dot)&&Vn();Ds(e,!1)}(),!1;case k.at:ws();case k._class:return Bs(!1),!1;case k._new:return function(){if($(k._new),ue(k.dot))return void Vn();Cn(),void ue(k.questionDot),I&&function(){if(pe(k.lessThan)){const e=w.snapshot();ss(),w.error&&w.restoreFromSnapshot(e)}}();ue(k.parenL)&&Kn(k.parenR)}(),!1;case k.backQuote:return On(),!1;case k.doubleColon:return re(),Cn(),!1;case k.hash:{const e=xe();return G[e]||e===g.backslash?En():re(),!1}default:return U(),!1}}function En(){ue(k.hash),Vn()}function Sn(){re()}function Nn(){$(k.parenL),dn(),$(k.parenR)}function jn(e){const t=w.snapshot(),n=w.tokens.length;$(k.parenL);let s=!0;for(;!pe(k.parenR)&&!w.error;){if(s)s=!1;else if($(k.comma),pe(k.parenR))break;if(pe(k.ellipsis)){et(!1),Ln();break}fn(!1,!0)}if($(k.parenR),e&&(pe(k.colon)||!P())){if(Rn())return w.restoreFromSnapshot(t),w.scopeDepth++,Ps(),Rn(),Fn(n),!w.error||(w.restoreFromSnapshot(t),jn(!1),!1)}return!1}function Rn(){return v?function(){if(pe(k.colon)){const e=w.snapshot();Ot(k.colon),P()&&U(),pe(k.arrow)||U(),w.error&&w.restoreFromSnapshot(e)}return ue(k.arrow)}():I?function(){if(pe(k.colon)){const e=ce(0),t=w.snapshot(),n=w.noAnonFunctionType;w.noAnonFunctionType=!0,Gn(),w.noAnonFunctionType=n,P()&&U(),pe(k.arrow)||U(),w.error&&w.restoreFromSnapshot(t),le(e)}return ue(k.arrow)}():ue(k.arrow)}function Ln(){(v||I)&&(he(k.question),pe(k.colon)&&(v?Pt():I&&gs()))}function On(){for(ie(),ie();!pe(k.backQuote)&&!w.error;)$(k.dollarBraceL),dn(),ie(),ie();re()}function Dn(e,t){const n=E();let s=!0;for(re(),w.tokens[w.tokens.length-1].contextId=n;!ue(k.braceR)&&!w.error;){if(s)s=!1;else if($(k.comma),ue(k.braceR))break;let o=!1;if(pe(k.ellipsis)){const n=w.tokens.length;if(Ze(),e&&(w.tokens.length===n+2&&st(t),ue(k.braceR)))break}else e||(o=ue(k.star)),!e&&R(m._async)?(o&&U(),Vn(),pe(k.colon)||pe(k.parenL)||pe(k.braceR)||pe(k.eq)||pe(k.comma)||(pe(k.star)&&(re(),o=!0),qn(n))):qn(n),Bn(e,t,n)}w.tokens[w.tokens.length-1].contextId=n}function Pn(e,t){const n=w.start;return pe(k.parenL)?(e&&U(),Mn(n,!1),!0):!!function(e){return!e&&(pe(k.string)||pe(k.num)||pe(k.bracketL)||pe(k.name)||!!(w.type&k.IS_KEYWORD))}(e)&&(qn(t),Mn(n,!1),!0)}function Bn(e,t,n){v?kt():I&&pe(k.lessThan)&&(ns(),pe(k.parenL)||U());Pn(e,n)||function(e,t){if(ue(k.colon))return void(e?ct(t):fn(!1));let n;n=e?0===w.scopeDepth?J.ObjectShorthandTopLevelDeclaration:t?J.ObjectShorthandBlockScopedDeclaration:J.ObjectShorthandFunctionScopedDeclaration:J.ObjectShorthand,w.tokens[w.tokens.length-1].identifierRole=n,ct(t,!0)}(e,t)}function qn(e){I&&ys(),ue(k.bracketL)?(w.tokens[w.tokens.length-1].contextId=e,fn(),$(k.bracketR),w.tokens[w.tokens.length-1].contextId=e):(pe(k.num)||pe(k.string)||pe(k.bigint)||pe(k.decimal)?An():En(),w.tokens[w.tokens.length-1].identifierRole=J.ObjectKey,w.tokens[w.tokens.length-1].contextId=e)}function Mn(e,t){const n=E();w.scopeDepth++;const s=w.tokens.length;Ps(t,n),$n(e,n);const o=w.tokens.length;w.scopes.push(new y(s,o,!0)),w.scopeDepth--}function Fn(e){Un(!0);const t=w.tokens.length;w.scopes.push(new y(e,t,!0)),w.scopeDepth--}function $n(e,t=0){v?function(e,t){if(pe(k.colon)&&Ot(k.colon),pe(k.braceL)||!M())Un(!1,t);else{let t=w.tokens.length-1;for(;t>=0&&(w.tokens[t].start>=e||w.tokens[t].type===k._default||w.tokens[t].type===k._export);)w.tokens[t].isType=!0,t--}}(e,t):I?function(e){pe(k.colon)&&Gn();Un(!1,e)}(t):Un(!1,t)}function Un(e,t=0){e&&!pe(k.braceL)?fn():Ss(!0,t)}function Kn(e,t=!1){let n=!0;for(;!ue(e)&&!w.error;){if(n)n=!1;else if($(k.comma),ue(e))break;Hn(t)}}function Hn(e){e&&pe(k.comma)||(pe(k.ellipsis)?(Ze(),Ln()):pe(k.question)?re():fn(!1,!0))}function Vn(){re(),w.tokens[w.tokens.length-1].type=k.name}function Wn(e){const t=ce(0);$(e||k.colon),ks(),le(t)}function zn(){$(k.modulo),D(m._checks),ue(k.parenL)&&(dn(),$(k.parenR))}function Gn(){const e=ce(0);$(k.colon),pe(k.modulo)?zn():(ks(),pe(k.modulo)&&zn()),le(e)}function Xn(){pe(k._class)?(re(),Jn(!0)):pe(k._function)?(re(),Vn(),pe(k.lessThan)&&ns(),$(k.parenL),hs(),$(k.parenR),Gn(),F()):pe(k._var)?(re(),xs(),F()):O(m._module)?ue(k.dot)?(D(m._exports),gs(),F()):function(){pe(k.string)?An():Vn();$(k.braceL);for(;!pe(k.braceR)&&!w.error;)pe(k._import)?(re(),Qs()):U();$(k.braceR)}():R(m._type)?(re(),es()):R(m._opaque)?(re(),ts(!0)):R(m._interface)?(re(),Jn()):pe(k._export)?($(k._export),ue(k._default)?pe(k._function)||pe(k._class)?Xn():(ks(),F()):pe(k._var)||pe(k._function)||pe(k._class)||R(m._opaque)?Xn():pe(k.star)||pe(k.braceL)||R(m._interface)||R(m._type)||R(m._opaque)?Vs():U()):U()}function Jn(e=!1){if(Zn(),pe(k.lessThan)&&ns(),ue(k._extends))do{Yn()}while(!e&&ue(k.comma));if(R(m._mixins)){re();do{Yn()}while(ue(k.comma))}if(R(m._implements)){re();do{Yn()}while(ue(k.comma))}is(e,!1,e)}function Yn(){ls(!1),pe(k.lessThan)&&ss()}function Qn(){Jn()}function Zn(){Vn()}function es(){Zn(),pe(k.lessThan)&&ns(),Wn(k.eq),F()}function ts(e){D(m._type),Zn(),pe(k.lessThan)&&ns(),pe(k.colon)&&Wn(k.colon),e||Wn(k.eq),F()}function ns(){const e=ce(0);pe(k.lessThan)||pe(k.typeParameterStart)?re():U();do{ys(),xs(),ue(k.eq)&&ks(),pe(k.greaterThan)||$(k.comma)}while(!pe(k.greaterThan)&&!w.error);$(k.greaterThan),le(e)}function ss(){const e=ce(0);for($(k.lessThan);!pe(k.greaterThan)&&!w.error;)ks(),pe(k.greaterThan)||$(k.comma);$(k.greaterThan),le(e)}function os(){pe(k.num)||pe(k.string)?An():Vn()}function rs(){for(pe(k.lessThan)&&ns(),$(k.parenL);!pe(k.parenR)&&!pe(k.ellipsis)&&!w.error;)us(),pe(k.parenR)||$(k.comma);ue(k.ellipsis)&&us(),$(k.parenR),Wn()}function is(e,t,n){let s;for(t&&pe(k.braceBarL)?($(k.braceBarL),s=k.braceBarR):($(k.braceL),s=k.braceR);!pe(s)&&!w.error;){if(n&&R(m._proto)){const t=de();t!==k.colon&&t!==k.question&&(re(),e=!1)}if(e&&R(m._static)){const e=de();e!==k.colon&&e!==k.question&&re()}if(ys(),ue(k.bracketL))ue(k.bracketL)?(os(),$(k.bracketR),$(k.bracketR),pe(k.lessThan)||pe(k.parenL)?rs():(ue(k.question),Wn())):(de()===k.colon?(os(),Wn()):ks(),$(k.bracketR),Wn());else if(pe(k.parenL)||pe(k.lessThan))rs();else{if(R(m._get)||R(m._set)){const e=de();e!==k.name&&e!==k.string&&e!==k.num||re()}as()}cs()}$(s)}function as(){if(pe(k.ellipsis)){if($(k.ellipsis),ue(k.comma)||ue(k.semi),pe(k.braceR))return;ks()}else os(),pe(k.lessThan)||pe(k.parenL)?rs():(ue(k.question),Wn())}function cs(){ue(k.semi)||ue(k.comma)||pe(k.braceR)||pe(k.braceBarR)||U()}function ls(e){for(e||Vn();ue(k.dot);)Vn()}function us(){const e=de();e===k.colon||e===k.question?(Vn(),ue(k.question),Wn()):ks()}function hs(){for(;!pe(k.parenR)&&!pe(k.ellipsis)&&!w.error;)us(),pe(k.parenR)||$(k.comma);ue(k.ellipsis)&&us()}function ps(){let e=!1;const t=w.noAnonFunctionType;switch(w.type){case k.name:return R(m._interface)?void function(){if(D(m._interface),ue(k._extends))do{Yn()}while(ue(k.comma));is(!1,!1,!1)}():(Vn(),ls(!0),void(pe(k.lessThan)&&ss()));case k.braceL:return void is(!1,!1,!1);case k.braceBarL:return void is(!1,!0,!1);case k.bracketL:return void function(){for($(k.bracketL);w.pos 0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex 0&&t 0&&this.tokenAtRelativeIndex(-1).type===k._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){const e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t ${e}require`);const t=this.tokens.currentToken().contextId;if(null==t)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(k.parenR,t);)this.rootTransformer.processToken();return void this.tokens.replaceToken(e?")))":"))")}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{const e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}mo(this.tokens),this.tokens.matches1(k.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(m._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,k.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,m._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(k.name)||this.tokens.matches1(k.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(k.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(k.string);)(!e&&this.tokens.matches1(k.braceL)||this.tokens.matches1(k.comma))&&(this.tokens.removeToken(),this.tokens.matches1(k.braceR)||(t=!0),(this.tokens.matches2(k.name,k.comma)||this.tokens.matches2(k.name,k.braceR)||this.tokens.matches4(k.name,k.name,k.name,k.comma)||this.tokens.matches4(k.name,k.name,k.name,k.braceR))&&(e=!0)),this.tokens.removeToken();return!this.keepUnusedImports&&(this.isTypeScriptTransformEnabled?!e:!!this.isFlowTransformEnabled&&(t&&!e))}removeRemainingImport(){for(;!this.tokens.matches1(k.string);)this.tokens.removeToken()}processIdentifier(){const e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===J.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==J.Access)return!1;const t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n =2&&this.tokens.matches1AtIndex(e-2,k.dot))return!1;if(e>=2&&[k._var,k._let,k._const].includes(this.tokens.tokens[e-2].type))return!1;const n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!n&&(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0)}processComplexAssignment(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==k.name)return!1;if(t.shadowsGlobal)return!1;if(e>=2&&this.tokens.matches1AtIndex(e-2,k.dot))return!1;const n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return!!n&&(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0)}processPreIncDec(){const e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==k.name)return!1;if(t.shadowsGlobal)return!1;if(e+2 =1&&this.tokens.matches1AtIndex(e-1,k.dot))return!1;const s=this.tokens.identifierNameForToken(t),o=this.importProcessor.resolveExportBinding(s);if(!o)return!1;const r=this.tokens.rawCodeForToken(n),i=this.importProcessor.getIdentifierReplacement(s)||s;if("++"===r)this.tokens.replaceToken(`(${i} = ${o} = ${i} + 1, ${i} - 1)`);else{if("--"!==r)throw new Error(`Unexpected operator: ${r}`);this.tokens.replaceToken(`(${i} = ${o} = ${i} - 1, ${i} + 1)`)}return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(k._export,k._default,k._function,k.name)||this.tokens.matches5(k._export,k._default,k.name,k._function,k.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,m._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();const e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(k._export,k._default,k._class,k.name)||this.tokens.matches5(k._export,k._default,k._abstract,k._class,k.name)||this.tokens.matches3(k._export,k._default,k.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(k._abstract)&&this.tokens.removeToken();const e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(ko(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){const e=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(k.at);)if(this.tokens.copyToken(),this.tokens.matches1(k.parenL))this.tokens.copyExpectedToken(k.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(k.parenR);else{for(this.tokens.copyExpectedToken(k.name);this.tokens.matches1(k.dot);)this.tokens.copyExpectedToken(k.dot),this.tokens.copyExpectedToken(k.name);this.tokens.matches1(k.parenL)&&(this.tokens.copyExpectedToken(k.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(k.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,k.name))return!1;for(e++;e n.call(t,...e))),t=void 0)}return n}([this,"access",e=>e.importProcessor,"optionalAccess",e=>e.getGlobalNames,"call",e=>e(),"optionalAccess",e=>e.has,"call",e=>e(_o)])&&this.extractHoistedCalls())}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map((e=>`${e}();`)).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(k.dot,k.name,k.parenL);){const t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(To.includes(t)){const t=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${_o}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(k.parenR),this.tokens.appendCode(";}"),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${_o}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(k.parenR),e=!0}return!0}}class vo extends De{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(k.num)){const e=this.tokens.currentTokenCode();if(e.includes("_"))return this.tokens.replaceToken(e.replace(/_/g,"")),!0}return!1}}class Io extends De{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return!!this.tokens.matches2(k._catch,k.braceL)&&(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0)}}class wo extends De{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(k.nullishCoalescing)){const e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(k._delete)){if(this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0}const e=this.tokens.currentToken().subscriptStartIndex;if(null!=e&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==k._super){const t=this.nameManager.claimFreeName("_");let n;if(n=e>0&&this.tokens.matches1AtIndex(e-1,k._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(n=`async ${n}`),this.tokens.matches2(k.questionDot,k.parenL)||this.tokens.matches2(k.questionDot,k.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${n}`);else if(this.tokens.matches2(k.questionDot,k.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${n}`);else if(this.tokens.matches1(k.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${n}.`);else if(this.tokens.matches1(k.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${n}.`);else if(this.tokens.matches1(k.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${n}[`);else{if(!this.tokens.matches1(k.parenL))throw new Error("Unexpected subscript operator in optional chain.");this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${n}(`)}return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(0===e&&null!=this.tokens.tokens[t].subscriptStartIndex)return this.tokens.tokens[t-1].type===k._super;t--}}}class Co extends De{constructor(e,t,n,s){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=s}process(){const e=this.tokens.currentIndex();if("createReactClass"===this.tokens.identifierName()){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(k.name,k.dot,k.name)&&"React"===this.tokens.identifierName()&&"createClass"===this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)){const t=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){const t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(k.parenL),this.tokens.copyExpectedToken(k.braceL),this.tokens.appendCode(`displayName: '${t}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(k.braceR),this.tokens.copyExpectedToken(k.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,k.name,k.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===J.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,k._export,k._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){const e=(this.options.filePath||"unknown").split("/"),t=e[e.length-1],n=t.lastIndexOf("."),s=-1===n?t:t.slice(0,n);return"index"===s&&e[e.length-2]?e[e.length-2]:s}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(k.parenL,k.braceL))return!1;const t=e+1,n=this.tokens.tokens[t].contextId;if(null==n)throw new Error("Expected non-null context ID on object open-brace.");for(;e ({variableName:e,uniqueLocalName:e})));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`\n;(function () {\n var reactHotLoader = require('react-hot-loader').default;\n var leaveModule = require('react-hot-loader').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map((({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||"")});`)).join("\n")}\n leaveModule(module);\n})();`}process(){return!1}}const Eo=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function So(e){if(0===e.length)return!1;if(!G[e.charCodeAt(0)])return!1;for(let t=1;t ` var ${e};`)).join("");for(const o of this.transformers)e+=o.getHoistedCode();let t="";for(const o of this.transformers)t+=o.getSuffixCode();const n=this.tokens.finish();let{code:s}=n;if(s.startsWith("#!")){let o=s.indexOf("\n");return-1===o&&(o=s.length,s+="\n"),{code:s.slice(0,o+1)+e+s.slice(o+1)+t,mappings:this.shiftMappings(n.mappings,e.length)}}return{code:e+s+t,mappings:this.shiftMappings(n.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(k.braceL)||this.tokens.matches1(k.dollarBraceL))e++;else if(this.tokens.matches1(k.braceR)){if(0===e)return;e--}if(this.tokens.matches1(k.parenL))t++;else if(this.tokens.matches1(k.parenR)){if(0===t)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(k._class))this.processClass();else{for(const e of this.transformers){if(e.process())return}this.tokens.copyToken()}}processNamedClass(){if(!this.tokens.matches2(k._class,k.name))throw new Error("Expected identifier for exported class name.");const e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){const e=ro(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0;let n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));const s=this.tokens.currentToken().contextId;if(null==s)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(k._class);!this.tokens.matchesContextIdAndLabel(k.braceL,s);)this.processToken();this.processClassBody(e,n);const o=e.staticInitializerNames.map((e=>`${n}.${e}()`));t?this.tokens.appendCode(`, ${o.map((e=>`${e}, `)).join("")}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${o.map((e=>`${e};`)).join(" ")}`)}processClassBody(e,t){const{headerInfo:n,constructorInsertPos:s,constructorInitializerStatements:o,fields:r,instanceInitializerNames:i,rangesToRemove:a}=e;let c=0,l=0;const u=this.tokens.currentToken().contextId;if(null==u)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(k.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");const h=o.length+i.length>0;if(null===s&&h){const e=this.makeConstructorInitCode(o,i,t);if(n.hasSuperclass){const t=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(k.braceR,u);)if(c =a[l].start){for(this.tokens.currentIndex()`${n}.prototype.${e}.call(this)`))].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(k.parenR,k.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,k.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex() "),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(m._async)&&!this.tokens.matches1(k._async))return!1;const e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==k.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,k.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex() t in e?Do(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uo=(e,t)=>{for(var n in t||(t={}))Mo.call(t,n)&&$o(e,n,t[n]);if(qo)for(var n of qo(t))Fo.call(t,n)&&$o(e,n,t[n]);return e},Ko=(e,t)=>Po(e,Bo(t)),Ho=e=>{const{tabMode:t="indentation"}=e,n=(0,s.useRef)(null),[o,r]=(0,s.useState)(e.code||""),{theme:i}=e;return(0,s.useEffect)((()=>{r(e.code)}),[e.code]),function(e,t,n){function o(t){var n=e.current;if(n){var s=d(n);n=p(n),s.position+=t.length-n.length,k.position=s,k.onChange(t,s)}}function r(t,n){var s=e.current;if(s){var o=window.getSelection().getRangeAt(0);o.deleteContents(),o.collapse();var r=n||0;(o=f(s,n=(o=d(s)).position+(0>r?r:0),o.position+(0 r-c||i&&i[1]===s?c=r:(n=++k.historyAt,k.history[n]=[o,s],k.history.splice(n+1),500 r(e.slice(0,-1))),{disabled:e.disabled,indentation:"indentation"===t?2:void 0}),(0,s.useEffect)((()=>{e.onChange&&e.onChange(o)}),[o]),(0,x.jsx)("div",{className:e.className,style:e.style,children:(0,x.jsx)(c.f4,{code:o,theme:e.theme||c.Zj.nightOwl,language:e.language,children:({className:e,tokens:t,getLineProps:s,getTokenProps:o,style:r})=>(0,x.jsx)("pre",{className:e,style:Uo(Uo({margin:0,outline:"none",padding:10,fontFamily:"inherit"},i&&"object"==typeof i.plain?i.plain:{}),r),ref:n,spellCheck:"false",children:t.map(((e,t)=>(0,x.jsxs)("span",Ko(Uo({},s({line:e})),{children:[e.filter((e=>!e.empty)).map(((e,t)=>(0,x.jsx)("span",Uo({},o({token:e})),`token-${t}`))),"\n"]}),`line-${t}`)))})})})},Vo=(0,s.createContext)({}),Wo=["jsx","imports"];function zo(e={}){const t=Array.isArray(e.transforms)?e.transforms.filter(Boolean):Wo;return e=>Lo(e,{transforms:t}).code}var Go=(e,t)=>class extends s.Component{componentDidCatch(e){t(e)}render(){return"function"==typeof e?(0,x.jsx)(e,{}):s.isValidElement(e)?e:null}},Xo=(e,t)=>{const n=Object.keys(t),s=n.map((e=>t[e]));return new Function(...n,e)(...s)};var Jo='const _jsxFileName = "";',Yo=e=>e.trim().replace(/;$/,""),Qo=e=>e.replace(Jo,"").trim(),Zo=e=>Jo+e,er=e=>`return (${e})`;var tr=function({children:e,code:t="",language:n="tsx",theme:o,enableTypeScript:r=!0,disabled:i=!1,scope:a,transformCode:c,noInline:l=!1}){const[u,h]=(0,s.useState)({error:void 0,element:void 0});function p(e){return t=this,n=null,o=function*(){const t=e=>{h({error:e.toString(),element:void 0})};try{const o=c?c(e):e;try{const e=yield Promise.resolve(o),n=e=>h({error:void 0,element:e});if("string"!=typeof e)throw new Error("Code failed to transform");const i={code:e,scope:a,enableTypeScript:r};l?(h({error:void 0,element:null}),(({code:e="",scope:t={},enableTypeScript:n=!0},o,r)=>{if(!/render\s*\(/.test(e))return r(new SyntaxError("No-Inline evaluations must call `render`."));const i=["jsx","imports"];n&&i.splice(1,0,"typescript"),Xo(zo({transforms:i})(e),Ko(Uo({React:s},t),{render:e=>{void 0===e?r(new SyntaxError("`render` must be called with valid JSX.")):o(Go(e,r))}}))})(i,n,t)):n((({code:e="",scope:t={},enableTypeScript:n=!0},o)=>{const r=["jsx"];n&&r.push("typescript");const i=function(...e){return e.reduce(((e,t)=>(...n)=>e(t(...n))))}(Zo,zo({transforms:["imports"]}),er,Qo,Yo,zo({transforms:r}),Yo)(e);return Go(Xo(i,Uo({React:s},t)),o)})(i,t))}catch(n){return t(n)}}catch(o){return t(o),Promise.resolve()}},new Promise(((e,s)=>{var r=e=>{try{a(o.next(e))}catch(t){s(t)}},i=e=>{try{a(o.throw(e))}catch(t){s(t)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(r,i);a((o=o.apply(t,n)).next())}));var t,n,o}const d=e=>h({error:e.toString()});return(0,s.useEffect)((()=>{p(t).catch(d)}),[t,a,l,c]),(0,x.jsx)(Vo.Provider,{value:Ko(Uo({},u),{code:t,language:n,theme:o,disabled:i,onError:d,onChange:e=>{p(e).catch(d)}}),children:e})};function nr(e){const{code:t,language:n,theme:o,disabled:r,onChange:i}=(0,s.useContext)(Vo);return(0,x.jsx)(Ho,Uo({theme:o,code:t,language:n,disabled:r,onChange:i},e))}function sr(e){const{error:t}=(0,s.useContext)(Vo);return t?(0,x.jsx)("pre",Ko(Uo({},e),{children:t})):null}var or=function(e){var t=e,{Component:n="div"}=t,o=((e,t)=>{var n={};for(var s in e)Mo.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&qo)for(var s of qo(e))t.indexOf(s)<0&&Fo.call(e,s)&&(n[s]=e[s]);return n})(t,["Component"]);const{element:r}=(0,s.useContext)(Vo);return(0,x.jsx)(n,Ko(Uo({},o),{children:r?(0,x.jsx)(r,{}):null}))};var rr=n(1312),ir=n(4586);function ar(e){let{children:t,fallback:n}=e;return(0,a.A)()?(0,x.jsx)(x.Fragment,{children:t?.()}):n??null}var cr=n(2181),lr=n(5293),ur=n(6342);function hr(){const{prism:e}=(0,ur.p)(),{colorMode:t}=(0,lr.G)(),n=e.theme,s=e.darkTheme||n;return"dark"===t?s:n}var pr=n(7489);const dr={playgroundContainer:"playgroundContainer_X_Ta",playgroundHeader:"playgroundHeader_dyrN",playgroundEditor:"playgroundEditor_Q6Y7",playgroundPreview:"playgroundPreview_DzOI"};function fr(e){let{children:t}=e;return(0,x.jsx)("div",{className:(0,i.A)(dr.playgroundHeader),children:t})}function mr(){return(0,x.jsx)("div",{children:"Loading..."})}function kr(){return(0,x.jsx)(ar,{fallback:(0,x.jsx)(mr,{}),children:()=>(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(pr.A,{fallback:e=>(0,x.jsx)(cr.MN,{...e}),children:(0,x.jsx)(or,{})}),(0,x.jsx)(sr,{})]})})}function gr(){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(fr,{children:(0,x.jsx)(rr.A,{id:"theme.Playground.result",description:"The result label of the live codeblocks",children:"Result"})}),(0,x.jsx)("div",{className:dr.playgroundPreview,children:(0,x.jsx)(kr,{})})]})}function xr(){const e=(0,a.A)();return(0,x.jsx)(nr,{className:dr.playgroundEditor},String(e))}function yr(){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(fr,{children:(0,x.jsx)(rr.A,{id:"theme.Playground.liveEditor",description:"The live editor label of the live codeblocks",children:"Live Editor"})}),(0,x.jsx)(xr,{})]})}const _r=e=>`${e};`;function Tr(e){let{children:t,transformCode:n,...s}=e;const{siteConfig:{themeConfig:o}}=(0,ir.A)(),{liveCodeBlock:{playgroundPosition:r}}=o,i=hr(),a=s.metastring?.includes("noInline")??!1;return(0,x.jsx)("div",{className:dr.playgroundContainer,children:(0,x.jsx)(tr,{code:t?.replace(/\n$/,""),noInline:a,transformCode:n??_r,theme:i,...s,children:"top"===r?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(gr,{}),(0,x.jsx)(yr,{})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(yr,{}),(0,x.jsx)(gr,{})]})})})}const br={React:s,...s};var vr=n(7559),Ir=n(8426),wr=n.n(Ir);const Cr=/title=(? ["'])(?.*?)\1/,Ar=/\{(? [\d,-]+)\}/,Er={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Sr={...Er,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},Nr=Object.keys(Er);function jr(e,t){const n=e.map((e=>{const{start:n,end:s}=Sr[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function Rr(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:o,metastring:r}=t;if(r&&Ar.test(r)){const e=r.match(Ar).groups.range;if(0===o.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${r}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=o[0].className,s=wr()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return jr(["js","jsBlock"],t);case"jsx":case"tsx":return jr(["js","jsBlock","jsx"],t);case"html":return jr(["js","jsBlock","html"],t);case"python":case"py":case"bash":return jr(["bash"],t);case"markdown":case"md":return jr(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return jr(["tex"],t);case"lua":case"haskell":case"sql":return jr(["lua"],t);case"wasm":return jr(["wasm"],t);case"vb":case"vba":case"visual-basic":return jr(["vb","rem"],t);case"vbnet":return jr(["vbnet","rem"],t);case"batch":return jr(["rem"],t);case"basic":return jr(["rem","f90"],t);case"fsharp":return jr(["js","ml"],t);case"ocaml":case"sml":return jr(["ml"],t);case"fortran":return jr(["f90"],t);case"cobol":return jr(["cobol"],t);default:return jr(Nr,t)}}(s,o),a=n.split("\n"),c=Object.fromEntries(o.map((e=>[e.className,{start:0,range:""}]))),l=Object.fromEntries(o.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),u=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),h=Object.fromEntries(o.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let d=0;d void 0!==e));l[t]?c[l[t]].range+=`${d},`:u[t]?c[u[t]].start=d:h[t]&&(c[h[t]].range+=`${c[h[t]].start}-${d-1},`),a.splice(d,1)}n=a.join("\n");const p={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;wr()(n).forEach((e=>{p[e]??=[],p[e].push(t)}))})),{lineClassNames:p,code:n}}const Lr={codeBlockContainer:"codeBlockContainer_Ckt0"};function Or(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,o]=e;const r=t[s];r&&"string"==typeof o&&(n[r]=o)})),n}(hr());return(0,x.jsx)(t,{...n,style:s,className:(0,i.A)(n.className,Lr.codeBlockContainer,vr.G.common.codeBlock)})}const Dr={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function Pr(e){let{children:t,className:n}=e;return(0,x.jsx)(Or,{as:"pre",tabIndex:0,className:(0,i.A)(Dr.codeBlockStandalone,"thin-scrollbar",n),children:(0,x.jsx)("code",{className:Dr.codeBlockLines,children:t})})}var Br=n(9532);const qr={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Mr(e,t){const[n,o]=(0,s.useState)(),r=(0,s.useCallback)((()=>{o(e.current?.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,s.useEffect)((()=>{r()}),[r]),function(e,t,n){void 0===n&&(n=qr);const o=(0,Br._q)(t),r=(0,Br.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(o);return e&&t.observe(e,r),()=>t.disconnect()}),[e,o,r])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),r())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const Fr={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function $r(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:o,getTokenProps:r}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const a=o({line:t,className:(0,i.A)(n,s&&Fr.codeLine)}),c=t.map(((e,t)=>(0,x.jsx)("span",{...r({token:e})},t)));return(0,x.jsxs)("span",{...a,children:[s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("span",{className:Fr.codeLineNumber}),(0,x.jsx)("span",{className:Fr.codeLineContent,children:c})]}):c,(0,x.jsx)("br",{})]})}function Ur(e){return(0,x.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,x.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Kr(e){return(0,x.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,x.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Hr={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Vr(e){let{code:t,className:n}=e;const[o,r]=(0,s.useState)(!1),a=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,{target:t=document.body}={}){if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const n=document.createElement("textarea"),s=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const o=document.getSelection(),r=o.rangeCount>0&&o.getRangeAt(0);t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let i=!1;try{i=document.execCommand("copy")}catch{}n.remove(),r&&(o.removeAllRanges(),o.addRange(r)),s&&s.focus()}(t),r(!0),a.current=window.setTimeout((()=>{r(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(a.current)),[]),(0,x.jsx)("button",{type:"button","aria-label":o?(0,rr.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,rr.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,rr.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,i.A)("clean-btn",n,Hr.copyButton,o&&Hr.copyButtonCopied),onClick:c,children:(0,x.jsxs)("span",{className:Hr.copyButtonIcons,"aria-hidden":"true",children:[(0,x.jsx)(Ur,{className:Hr.copyButtonIcon}),(0,x.jsx)(Kr,{className:Hr.copyButtonSuccessIcon})]})})}function Wr(e){return(0,x.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,x.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const zr={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Gr(e){let{className:t,onClick:n,isEnabled:s}=e;const o=(0,rr.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,x.jsx)("button",{type:"button",onClick:n,className:(0,i.A)("clean-btn",t,s&&zr.wordWrapButtonEnabled),"aria-label":o,title:o,children:(0,x.jsx)(Wr,{className:zr.wordWrapButtonIcon,"aria-hidden":"true"})})}function Xr(e){let{children:t,className:n="",metastring:o,title:r,showLineNumbers:a,language:l}=e;const{prism:{defaultLanguage:u,magicComments:h}}=(0,ur.p)(),p=function(e){return e?.toLowerCase()}(l??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??u),d=hr(),f=function(){const[e,t]=(0,s.useState)(!1),[n,o]=(0,s.useState)(!1),r=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=r.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[r,e]),a=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=r.current,n=e>t||r.current.querySelector("code").hasAttribute("style");o(n)}),[r]);return Mr(r,a),(0,s.useEffect)((()=>{a()}),[e,a]),(0,s.useEffect)((()=>(window.addEventListener("resize",a,{passive:!0}),()=>{window.removeEventListener("resize",a)})),[a]),{codeBlockRef:r,isEnabled:e,isCodeScrollable:n,toggle:i}}(),m=function(e){return e?.match(Cr)?.groups.title??""}(o)||r,{lineClassNames:k,code:g}=Rr(t,{metastring:o,language:p,magicComments:h}),y=a??function(e){return Boolean(e?.includes("showLineNumbers"))}(o);return(0,x.jsxs)(Or,{as:"div",className:(0,i.A)(n,p&&!n.includes(`language-${p}`)&&`language-${p}`),children:[m&&(0,x.jsx)("div",{className:Dr.codeBlockTitle,children:m}),(0,x.jsxs)("div",{className:Dr.codeBlockContent,children:[(0,x.jsx)(c.f4,{theme:d,code:g,language:p??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:o,getTokenProps:r}=e;return(0,x.jsx)("pre",{tabIndex:0,ref:f.codeBlockRef,className:(0,i.A)(t,Dr.codeBlock,"thin-scrollbar"),style:n,children:(0,x.jsx)("code",{className:(0,i.A)(Dr.codeBlockLines,y&&Dr.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,x.jsx)($r,{line:e,getLineProps:o,getTokenProps:r,classNames:k[t],showLineNumbers:y},t)))})})}}),(0,x.jsxs)("div",{className:Dr.buttonGroup,children:[(f.isEnabled||f.isCodeScrollable)&&(0,x.jsx)(Gr,{className:Dr.codeButton,onClick:()=>f.toggle(),isEnabled:f.isEnabled}),(0,x.jsx)(Vr,{className:Dr.codeButton,code:g})]})]})]})}const Jr=(Yr=function(e){let{children:t,...n}=e;const o=(0,a.A)(),r=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),i="string"==typeof r?Xr:Pr;return(0,x.jsx)(i,{...n,children:r},String(o))},function(e){return e.live?(0,x.jsx)(Tr,{scope:br,...e}):(0,x.jsx)(Yr,{...e})});var Yr;function Qr(e){return(0,x.jsx)("code",{...e})}var Zr=n(8774);var ei=n(3427),ti=n(1422);const ni={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function si(e){return!!e&&("SUMMARY"===e.tagName||si(e.parentElement))}function oi(e,t){return!!e&&(e===t||oi(e.parentElement,t))}function ri(e){let{summary:t,children:n,...o}=e;(0,ei.A)().collectAnchor(o.id);const r=(0,a.A)(),c=(0,s.useRef)(null),{collapsed:l,setCollapsed:u}=(0,ti.u)({initialState:!o.open}),[h,p]=(0,s.useState)(o.open),d=s.isValidElement(t)?t:(0,x.jsx)("summary",{children:t??"Details"});return(0,x.jsxs)("details",{...o,ref:c,open:h,"data-collapsed":l,className:(0,i.A)(ni.details,r&&ni.isBrowser,o.className),onMouseDown:e=>{si(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;si(t)&&oi(t,c.current)&&(e.preventDefault(),l?(u(!1),p(!0)):u(!0))},children:[d,(0,x.jsx)(ti.N,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{u(e),p(!e)},children:(0,x.jsx)("div",{className:ni.collapsibleContent,children:n})})]})}const ii={details:"details_b_Ee"},ai="alert alert--info";function ci(e){let{...t}=e;return(0,x.jsx)(ri,{...t,className:(0,i.A)(ai,ii.details,t.className)})}function li(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),o=(0,x.jsx)(x.Fragment,{children:t.filter((e=>e!==n))});return(0,x.jsx)(ci,{...e,summary:n,children:o})}var ui=n(1107);function hi(e){return(0,x.jsx)(ui.A,{...e})}const pi={containsTaskList:"containsTaskList_mC6p"};function di(e){if(void 0!==e)return(0,i.A)(e,e?.includes("contains-task-list")&&pi.containsTaskList)}const fi={img:"img_ev3q"};var mi=n(7293);const ki={Head:r.A,details:li,Details:li,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")))}(e)?(0,x.jsx)(Qr,{...e}):(0,x.jsx)(Jr,{...e})},a:function(e){return(0,x.jsx)(Zr.A,{...e})},pre:function(e){return(0,x.jsx)(x.Fragment,{children:e.children})},ul:function(e){return(0,x.jsx)("ul",{...e,className:di(e.className)})},li:function(e){return(0,ei.A)().collectAnchor(e.id),(0,x.jsx)("li",{...e})},img:function(e){return(0,x.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,i.A)(t,fi.img))});var t},h1:e=>(0,x.jsx)(hi,{as:"h1",...e}),h2:e=>(0,x.jsx)(hi,{as:"h2",...e}),h3:e=>(0,x.jsx)(hi,{as:"h3",...e}),h4:e=>(0,x.jsx)(hi,{as:"h4",...e}),h5:e=>(0,x.jsx)(hi,{as:"h5",...e}),h6:e=>(0,x.jsx)(hi,{as:"h6",...e}),admonition:mi.A,mermaid:()=>null};function gi(e){let{children:t}=e;return(0,x.jsx)(o.x,{components:ki,children:t})}},6266:(e,t,n)=>{"use strict";n.d(t,{i:()=>o});var s=n(4586);function o(e){void 0===e&&(e={});const{i18n:{currentLocale:t}}=(0,s.A)(),n=function(){const{i18n:{currentLocale:e,localeConfigs:t}}=(0,s.A)();return t[e].calendar}();return new Intl.DateTimeFormat(t,{calendar:n,...e})}},89:(e,t)=>{"use strict";var n="\n",s=function(){function e(e){this.string=e;for(var t=[0],s=0;s this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;return{line:t,column:e-n[t]}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()},8426:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,o,r]=t;if(s&&r){s=parseInt(s),r=parseInt(r);const e=s 0&&s.push(o+" more"),n._failMsg="is none of "+s.join(", ")):n._failMsg="is none of "+o+" types",n}return o(t,e),t.prototype.getChecker=function(e,t){var n=this,s=this.ttypes.map((function(n){return n.getChecker(e,t)}));return function(e,t){for(var o=t.unionResolver(),r=0;r =s._score)&&(s=i)}s&&s._score>0&&((t=this._propNames).push.apply(t,s._propNames),(n=this._messages).push.apply(n,s._messages))},e.prototype.getError=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var s=this._propNames[n];e+="number"==typeof s?"["+s+"]":s?"."+s:"";var r=this._messages[n];r&&t.push(e+" "+r)}return new o(e,t.join("; "))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var s=this._propNames[n];e+="number"==typeof s?"["+s+"]":s?"."+s:"";var o=this._messages[n];o&&t.push({path:e,message:o})}var r=null;for(n=t.length-1;n>=0;n--)r&&(t[n].nested=[r]),r=t[n];return r},e}();t.DetailContext=i;var a=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new i;return this.contexts.push(e),e},e}()},8453:(e,t,n)=>{"use strict";n.d(t,{R:()=>i,x:()=>a});var s=n(6540);const o={},r=s.createContext(o);function i(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/739bf370.65d0eaad.js b/assets/js/739bf370.a6284299.js similarity index 97% rename from assets/js/739bf370.65d0eaad.js rename to assets/js/739bf370.a6284299.js index 8e23fe6e..751d631d 100644 --- a/assets/js/739bf370.65d0eaad.js +++ b/assets/js/739bf370.a6284299.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4812],{8145:(e,n,a)=>{a.r(n),a.d(n,{Tag:()=>l,assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>h});var t=a(4848),r=a(8453),s=a(8597);const o={sidebar_position:1,sidebar_label:"Intro"},d="BabyPandas Documentation",i={id:"documentation/intro",title:"intro",description:"Assumption: Assume that df is a DataFrame, ser is a Series, arr is an array, and we already run import babypandas as bpd and import numpy as np.",source:"@site/docs/documentation/intro.md",sourceDirName:"documentation",slug:"/documentation/intro",permalink:"/bpd-reference/docs/documentation/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,sidebar_label:"Intro"},sidebar:"docsSidebar",next:{title:"Building and Organizing DataFrames",permalink:"/bpd-reference/docs/documentation/building-organizing/"}},c={},l=({children:e,color:n})=>{const a={span:"span",...(0,r.R)()};return(0,t.jsx)(a.span,{style:{backgroundColor:n,borderRadius:"4px",color:"#fff",padding:"0.2rem 0.5rem",fontWeight:"bold"},children:e})},h=[];function p(e){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"babypandas-documentation",children:"BabyPandas Documentation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(l,{color:"#FF5733",children:"Assumption:"})," Assume that ",(0,t.jsx)(n.code,{children:"df"})," is a DataFrame, ",(0,t.jsx)(n.code,{children:"ser"})," is a Series, ",(0,t.jsx)(n.code,{children:"arr"})," is an array, and we already run ",(0,t.jsx)(n.code,{children:"import babypandas as bpd"})," and ",(0,t.jsx)(n.code,{children:"import numpy as np"}),"."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["This section contains common and useful methods in the BabyPandas package. For examples in this section, refer to the ",(0,t.jsx)(n.code,{children:"pets"})," DataFrame."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets\n"})}),"\n",(0,t.jsx)(s.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:a(4853).A+"",children:"Download this data"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,n,a)=>{a.d(n,{A:()=>r});a(6540);var t=a(4848);const r=e=>{let{data:n}=e,a=[],r=[],s="",o=[];if(n){const e=JSON.parse(n);a=e.columns||[],r=e.data||[],s=e.indexName||"Index",o=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:s}),a.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:o[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(a=e,"boolean"==typeof a?a.toString().charAt(0).toUpperCase()+a.toString().slice(1):a)},n);var a}))]},n)))})]})})}},4853:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/files/pets-75b73fd7a514f0ed386c8767c7c854bf.csv"},8453:(e,n,a)=>{a.d(n,{R:()=>o,x:()=>d});var t=a(6540);const r={},s=t.createContext(r);function o(e){const n=t.useContext(s);return t.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(r):e.components||r:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4812],{8145:(e,n,a)=>{a.r(n),a.d(n,{Tag:()=>l,assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>o,metadata:()=>i,toc:()=>h});var t=a(4848),r=a(8453),s=a(8597);const o={sidebar_position:1,sidebar_label:"Intro"},d="BabyPandas Documentation",i={id:"documentation/intro",title:"intro",description:"Assumption: Assume that df is a DataFrame, ser is a Series, arr is an array, and we already run import babypandas as bpd and import numpy as np.",source:"@site/docs/documentation/intro.md",sourceDirName:"documentation",slug:"/documentation/intro",permalink:"/bpd-reference/docs/documentation/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,sidebar_label:"Intro"},sidebar:"docsSidebar",next:{title:"Building and Organizing DataFrames",permalink:"/bpd-reference/docs/documentation/building-organizing/"}},c={},l=({children:e,color:n})=>{const a={span:"span",...(0,r.R)()};return(0,t.jsx)(a.span,{style:{backgroundColor:n,borderRadius:"4px",color:"#fff",padding:"0.2rem 0.5rem",fontWeight:"bold"},children:e})},h=[];function p(e){const n={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"babypandas-documentation",children:"BabyPandas Documentation"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(l,{color:"#FF5733",children:"Assumption:"})," Assume that ",(0,t.jsx)(n.code,{children:"df"})," is a DataFrame, ",(0,t.jsx)(n.code,{children:"ser"})," is a Series, ",(0,t.jsx)(n.code,{children:"arr"})," is an array, and we already run ",(0,t.jsx)(n.code,{children:"import babypandas as bpd"})," and ",(0,t.jsx)(n.code,{children:"import numpy as np"}),"."]}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsxs)(n.p,{children:["This section contains common and useful methods in the BabyPandas package. For examples in this section, refer to the ",(0,t.jsx)(n.code,{children:"pets"})," DataFrame."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"pets\n"})}),"\n",(0,t.jsx)(s.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:a(4853).A+"",children:"Download this data"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8597:(e,n,a)=>{a.d(n,{A:()=>r});a(6540);var t=a(4848);const r=e=>{let{data:n}=e,a=[],r=[],s="",o=[];if(n){const e=JSON.parse(n);a=e.columns||[],r=e.data||[],s=e.indexName||"Index",o=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:s}),a.map(((e,n)=>(0,t.jsx)("th",{children:e},n)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,n)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:o[n]}),e.map(((e,n)=>{return(0,t.jsx)("td",{children:(a=e,"boolean"==typeof a?a.toString().charAt(0).toUpperCase()+a.toString().slice(1):a)},n);var a}))]},n)))})]})})}},4853:(e,n,a)=>{a.d(n,{A:()=>t});const t=a.p+"assets/files/pets-60c4fcbf3eef32ca775cf4990a93182a.csv"},8453:(e,n,a)=>{a.d(n,{R:()=>o,x:()=>d});var t=a(6540);const r={},s=t.createContext(r);function o(e){const n=t.useContext(s);return t.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(r):e.components||r:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7661071f.bb313545.js b/assets/js/7661071f.8c73ff37.js similarity index 96% rename from assets/js/7661071f.bb313545.js rename to assets/js/7661071f.8c73ff37.js index 9619956c..69857b78 100644 --- a/assets/js/7661071f.bb313545.js +++ b/assets/js/7661071f.8c73ff37.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[8737],{4137:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>u});var s=n(4848),t=n(8453);const r={slug:"welcome",title:"Welcome",authors:["slorber","yangshun"],tags:["facebook","hello","docusaurus"]},l=void 0,a={permalink:"/bpd-reference/blog/welcome",source:"@site/blog/2021-08-26-welcome/index.md",title:"Welcome",description:"Docusaurus blogging features are powered by the blog plugin.",date:"2021-08-26T00:00:00.000Z",tags:[{label:"facebook",permalink:"/bpd-reference/blog/tags/facebook"},{label:"hello",permalink:"/bpd-reference/blog/tags/hello"},{label:"docusaurus",permalink:"/bpd-reference/blog/tags/docusaurus"}],readingTime:.405,hasTruncateMarker:!1,authors:[{name:"S\xe9bastien Lorber",title:"Docusaurus maintainer",url:"https://sebastienlorber.com",imageURL:"https://github.com/slorber.png",key:"slorber"},{name:"Yangshun Tay",title:"Front End Engineer @ Facebook",url:"https://github.com/yangshun",imageURL:"https://github.com/yangshun.png",key:"yangshun"}],frontMatter:{slug:"welcome",title:"Welcome",authors:["slorber","yangshun"],tags:["facebook","hello","docusaurus"]},unlisted:!1,nextItem:{title:"MDX Blog Post",permalink:"/bpd-reference/blog/mdx-blog-post"}},c={authorsImageUrls:[void 0,void 0]},u=[];function i(e){const o={a:"a",code:"code",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.a,{href:"https://docusaurus.io/docs/blog",children:"Docusaurus blogging features"})," are powered by the ",(0,s.jsx)(o.a,{href:"https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog",children:"blog plugin"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Simply add Markdown files (or folders) to the ",(0,s.jsx)(o.code,{children:"blog"})," directory."]}),"\n",(0,s.jsxs)(o.p,{children:["Regular blog authors can be added to ",(0,s.jsx)(o.code,{children:"authors.yml"}),"."]}),"\n",(0,s.jsx)(o.p,{children:"The blog post date can be extracted from filenames, such as:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.code,{children:"2019-05-30-welcome.md"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.code,{children:"2019-05-30-welcome/index.md"})}),"\n"]}),"\n",(0,s.jsx)(o.p,{children:"A blog post folder can be convenient to co-locate blog post images:"}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"Docusaurus Plushie",src:n(6106).A+"",width:"1500",height:"500"})}),"\n",(0,s.jsx)(o.p,{children:"The blog supports tags as well!"}),"\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"And if you don't want a blog"}),": just delete this directory, and use ",(0,s.jsx)(o.code,{children:"blog: false"})," in your Docusaurus config."]})]})}function d(e={}){const{wrapper:o}={...(0,t.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},6106:(e,o,n)=>{n.d(o,{A:()=>s});const s=n.p+"assets/images/docusaurus-plushie-banner-a60f7593abca1e3eef26a9afa244e4fb.jpeg"},8453:(e,o,n)=>{n.d(o,{R:()=>l,x:()=>a});var s=n(6540);const t={},r=s.createContext(t);function l(e){const o=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(r.Provider,{value:o},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[8737],{4137:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>u});var s=n(4848),t=n(8453);const r={slug:"welcome",title:"Welcome",authors:["slorber","yangshun"],tags:["facebook","hello","docusaurus"]},l=void 0,a={permalink:"/bpd-reference/blog/welcome",source:"@site/blog/2021-08-26-welcome/index.md",title:"Welcome",description:"Docusaurus blogging features are powered by the blog plugin.",date:"2021-08-26T00:00:00.000Z",tags:[{label:"facebook",permalink:"/bpd-reference/blog/tags/facebook"},{label:"hello",permalink:"/bpd-reference/blog/tags/hello"},{label:"docusaurus",permalink:"/bpd-reference/blog/tags/docusaurus"}],readingTime:.405,hasTruncateMarker:!1,authors:[{name:"S\xe9bastien Lorber",title:"Docusaurus maintainer",url:"https://sebastienlorber.com",imageURL:"https://github.com/slorber.png",key:"slorber"},{name:"Yangshun Tay",title:"Front End Engineer @ Facebook",url:"https://github.com/yangshun",imageURL:"https://github.com/yangshun.png",key:"yangshun"}],frontMatter:{slug:"welcome",title:"Welcome",authors:["slorber","yangshun"],tags:["facebook","hello","docusaurus"]},unlisted:!1,nextItem:{title:"MDX Blog Post",permalink:"/bpd-reference/blog/mdx-blog-post"}},c={authorsImageUrls:[void 0,void 0]},u=[];function i(e){const o={a:"a",code:"code",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.a,{href:"https://docusaurus.io/docs/blog",children:"Docusaurus blogging features"})," are powered by the ",(0,s.jsx)(o.a,{href:"https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog",children:"blog plugin"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["Simply add Markdown files (or folders) to the ",(0,s.jsx)(o.code,{children:"blog"})," directory."]}),"\n",(0,s.jsxs)(o.p,{children:["Regular blog authors can be added to ",(0,s.jsx)(o.code,{children:"authors.yml"}),"."]}),"\n",(0,s.jsx)(o.p,{children:"The blog post date can be extracted from filenames, such as:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.code,{children:"2019-05-30-welcome.md"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.code,{children:"2019-05-30-welcome/index.md"})}),"\n"]}),"\n",(0,s.jsx)(o.p,{children:"A blog post folder can be convenient to co-locate blog post images:"}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"Docusaurus Plushie",src:n(9149).A+"",width:"1500",height:"500"})}),"\n",(0,s.jsx)(o.p,{children:"The blog supports tags as well!"}),"\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"And if you don't want a blog"}),": just delete this directory, and use ",(0,s.jsx)(o.code,{children:"blog: false"})," in your Docusaurus config."]})]})}function d(e={}){const{wrapper:o}={...(0,t.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},9149:(e,o,n)=>{n.d(o,{A:()=>s});const s=n.p+"assets/images/docusaurus-plushie-banner-a60f7593abca1e3eef26a9afa244e4fb.jpeg"},8453:(e,o,n)=>{n.d(o,{R:()=>l,x:()=>a});var s=n(6540);const t={},r=s.createContext(t);function l(e){const o=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(r.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/79080f49.9a0341a0.js b/assets/js/79080f49.9a0341a0.js deleted file mode 100644 index c1a6ce25..00000000 --- a/assets/js/79080f49.9a0341a0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2540],{3730:e=>{e.exports=JSON.parse('{"tag":{"label":"for-loop","permalink":"/bpd-reference/docs/tags/for-loop","allTagsPath":"/bpd-reference/docs/tags","count":3,"items":[{"id":"statistical-inference/bootstrapping","title":"Bootstrapping and Confidence Intervals","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/bootstrapping"},{"id":"statistical-inference/hypothesis_test","title":"Hypothesis Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/hypothesis_test"},{"id":"statistical-inference/permutation_test","title":"Permutation Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/permutation_test"}],"unlisted":false}}')}}]); \ No newline at end of file diff --git a/assets/js/809bd41b.0c13f0ab.js b/assets/js/809bd41b.0c13f0ab.js new file mode 100644 index 00000000..f186a811 --- /dev/null +++ b/assets/js/809bd41b.0c13f0ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[8675],{8051:e=>{e.exports=JSON.parse('{"label":"histogram","permalink":"/bpd-reference/docs/tags/histogram","allTagsPath":"/bpd-reference/docs/tags","count":3,"items":[{"id":"statistical-inference/bootstrapping","title":"Bootstrapping and Confidence Intervals","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/bootstrapping"},{"id":"statistical-inference/hypothesis_test","title":"Hypothesis Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/hypothesis_test"},{"id":"statistical-inference/permutation_test","title":"Permutation Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/permutation_test"}],"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/81322b72.65633f64.js b/assets/js/81322b72.65633f64.js deleted file mode 100644 index 8d0299e5..00000000 --- a/assets/js/81322b72.65633f64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[94],{7352:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=n(4848),t=n(8453),i=(n(8597),n(8205));const a={sidebar_position:7},c=void 0,o={id:"documentation/series-methods/ser.unique()",title:"ser.unique()",description:"ser.unique()",source:"@site/docs/documentation/series-methods/ser.unique().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.unique()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.unique()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.unique().md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"docsSidebar",previous:{title:"ser.median()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.median()"},next:{title:"ser.str.split()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.split()"}},d={},l=[];function u(e){const s={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:"ser.unique()"}),"\n",(0,r.jsx)("div",{className:"base",children:(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Returns the unique values in the Series."})})}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\r\nweight_ser\n"})}),"\n",(0,r.jsx)(i.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"weight_ser.unique()\n"})}),"\n",(0,r.jsx)(s.p,{children:"array([40. , 1.5 , 15. , 80. , 25. , 1. , 0.25, 10. ])"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"# Number of unique values\r\nlen(weight_ser.unique())\n"})}),"\n",(0,r.jsx)(s.p,{children:"8"})]})}function p(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var r=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],i="",a=[];if(s){const e=JSON.parse(s);n=e.columns||[],t=e.data||[],i=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:i}),n.map(((e,s)=>(0,r.jsx)("th",{children:e},s)))]})}),(0,r.jsx)("tbody",{children:t.map(((e,s)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:a[s]}),e.map(((e,s)=>{return(0,r.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var r=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],i="",a="";if(s)try{const e=JSON.parse(s);i=e.name||"",a=e.dtype||"Unknown type",n=e.index||[],t=e.data||[]}catch(o){console.error("Error parsing data prop in SeriesComponent:",o)}const c=t.map((e=>JSON.stringify(e)));return(0,r.jsxs)("div",{className:"series-container",children:[(0,r.jsx)("ul",{className:"series-list",children:c.map(((e,s)=>(0,r.jsxs)("li",{className:"series-item",children:[(0,r.jsx)("span",{className:"series-index",children:n[s]}),(0,r.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,r.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",a]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>c});var r=n(6540);const t={},i=r.createContext(t);function a(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/81322b72.90d5758b.js b/assets/js/81322b72.90d5758b.js new file mode 100644 index 00000000..fc282f1c --- /dev/null +++ b/assets/js/81322b72.90d5758b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[94],{7352:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=n(4848),t=n(8453),i=(n(8597),n(8205));const a={sidebar_position:7},c=void 0,o={id:"documentation/series-methods/ser.unique()",title:"ser.unique()",description:"ser.unique()",source:"@site/docs/documentation/series-methods/ser.unique().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.unique()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.unique()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.unique().md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"docsSidebar",previous:{title:"ser.median()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.median()"},next:{title:"ser.str.split()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.split()"}},d={},l=[];function u(e){const s={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:"ser.unique()"}),"\n",(0,r.jsx)("div",{className:"base",children:(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Returns the unique values in the Series."})})}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\nweight_ser\n"})}),"\n",(0,r.jsx)(i.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"weight_ser.unique()\n"})}),"\n",(0,r.jsx)(s.p,{children:"array([40. , 1.5 , 15. , 80. , 25. , 1. , 0.25, 10. ])"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"# Number of unique values\nlen(weight_ser.unique())\n"})}),"\n",(0,r.jsx)(s.p,{children:"8"})]})}function p(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var r=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],i="",a=[];if(s){const e=JSON.parse(s);n=e.columns||[],t=e.data||[],i=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:i}),n.map(((e,s)=>(0,r.jsx)("th",{children:e},s)))]})}),(0,r.jsx)("tbody",{children:t.map(((e,s)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:a[s]}),e.map(((e,s)=>{return(0,r.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var r=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],i="",a="";if(s)try{const e=JSON.parse(s);i=e.name||"",a=e.dtype||"Unknown type",n=e.index||[],t=e.data||[]}catch(o){console.error("Error parsing data prop in SeriesComponent:",o)}const c=t.map((e=>JSON.stringify(e)));return(0,r.jsxs)("div",{className:"series-container",children:[(0,r.jsx)("ul",{className:"series-list",children:c.map(((e,s)=>(0,r.jsxs)("li",{className:"series-item",children:[(0,r.jsx)("span",{className:"series-index",children:n[s]}),(0,r.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,r.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",a]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>c});var r=n(6540);const t={},i=r.createContext(t);function a(e){const s=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/82ff9878.7e78a65b.js b/assets/js/82ff9878.7e78a65b.js deleted file mode 100644 index 44699d89..00000000 --- a/assets/js/82ff9878.7e78a65b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[675],{4458:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var r=t(4848),n=t(8453),a=(t(8597),t(8205));const i={sidebar_position:12},o=void 0,d={id:"documentation/series-methods/ser.str.capitalize()",title:"ser.str.capitalize()",description:"ser.str.capitalize()",source:"@site/docs/documentation/series-methods/ser.str.capitalize().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.capitalize()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.capitalize()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.capitalize().md",tags:[],version:"current",sidebarPosition:12,frontMatter:{sidebar_position:12},sidebar:"docsSidebar",previous:{title:"ser.str.upper()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.upper()"},next:{title:"ser.str.title()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.title()"}},c={},l=[];function h(e){const s={code:"code",hr:"hr",pre:"pre",strong:"strong",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("code",{children:"ser.str.capitalize()"}),"\n",(0,r.jsxs)("div",{className:"base",children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Converts strings in the Series to be capitalized. Only the first character in the string will be capitalized."})}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Returns:"}),(0,r.jsx)("dd",{children:"Returns a Series with each element's first character capitalized."}),(0,r.jsx)("dt",{className:"term",children:"Return Type:"}),(0,r.jsx)("dd",{children:"Series"})]})]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\r\ncomment_ser\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,r.jsxs)("p",{children:[(0,r.jsx)("br",{})," ",(0,r.jsxs)(s.strong,{children:["Notice that ",(0,r.jsx)(s.code,{children:"ser.str.capitalize()"})," only works when there are no special characters before the first letter in the sentence."]})," "]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser.str.capitalize()\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" there are no bad dogs, only bad owners.","My best birthday present ever!!!","****all you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,r.jsxs)("p",{children:[(0,r.jsx)("br",{})," ",(0,r.jsxs)(s.strong,{children:["After removing special characters, ",(0,r.jsx)(s.code,{children:"ser.str.capitalize()"})," will work. This is also an example of how to use multiple ",(0,r.jsx)(s.code,{children:"ser.str"})," methods on a bpd Series."]})," "]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser.str.strip().str.capitalize()\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":["There are no bad dogs, only bad owners.","My best birthday present ever!!!","****all you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'})]})}function p(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",i=[];if(s){const e=JSON.parse(s);t=e.columns||[],n=e.data||[],a=e.indexName||"Index",i=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}),t.map(((e,s)=>(0,r.jsx)("th",{children:e},s)))]})}),(0,r.jsx)("tbody",{children:n.map(((e,s)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,r.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",t=e.index||[],n=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const o=n.map((e=>JSON.stringify(e)));return(0,r.jsxs)("div",{className:"series-container",children:[(0,r.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,r.jsxs)("li",{className:"series-item",children:[(0,r.jsx)("span",{className:"series-index",children:t[s]}),(0,r.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,r.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var r=t(6540);const n={},a=r.createContext(n);function i(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/82ff9878.9143662a.js b/assets/js/82ff9878.9143662a.js new file mode 100644 index 00000000..efcf095d --- /dev/null +++ b/assets/js/82ff9878.9143662a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[675],{4458:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var r=t(4848),n=t(8453),a=(t(8597),t(8205));const i={sidebar_position:12},o=void 0,d={id:"documentation/series-methods/ser.str.capitalize()",title:"ser.str.capitalize()",description:"ser.str.capitalize()",source:"@site/docs/documentation/series-methods/ser.str.capitalize().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.capitalize()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.capitalize()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.capitalize().md",tags:[],version:"current",sidebarPosition:12,frontMatter:{sidebar_position:12},sidebar:"docsSidebar",previous:{title:"ser.str.upper()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.upper()"},next:{title:"ser.str.title()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.title()"}},c={},l=[];function h(e){const s={code:"code",hr:"hr",pre:"pre",strong:"strong",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("code",{children:"ser.str.capitalize()"}),"\n",(0,r.jsxs)("div",{className:"base",children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:"Converts strings in the Series to be capitalized. Only the first character in the string will be capitalized."})}),(0,r.jsxs)("dl",{children:[(0,r.jsx)("dt",{className:"term",children:"Returns:"}),(0,r.jsx)("dd",{children:"Returns a Series with each element's first character capitalized."}),(0,r.jsx)("dt",{className:"term",children:"Return Type:"}),(0,r.jsx)("dd",{children:"Series"})]})]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\ncomment_ser\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,r.jsxs)("p",{children:[(0,r.jsx)("br",{})," ",(0,r.jsxs)(s.strong,{children:["Notice that ",(0,r.jsx)(s.code,{children:"ser.str.capitalize()"})," only works when there are no special characters before the first letter in the sentence."]})," "]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser.str.capitalize()\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" there are no bad dogs, only bad owners.","My best birthday present ever!!!","****all you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,r.jsxs)("p",{children:[(0,r.jsx)("br",{})," ",(0,r.jsxs)(s.strong,{children:["After removing special characters, ",(0,r.jsx)(s.code,{children:"ser.str.capitalize()"})," will work. This is also an example of how to use multiple ",(0,r.jsx)(s.code,{children:"ser.str"})," methods on a bpd Series."]})," "]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"comment_ser.str.strip().str.capitalize()\n"})}),"\n",(0,r.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":["There are no bad dogs, only bad owners.","My best birthday present ever!!!","****all you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'})]})}function p(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8597:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",i=[];if(s){const e=JSON.parse(s);t=e.columns||[],n=e.data||[],a=e.indexName||"Index",i=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}),t.map(((e,s)=>(0,r.jsx)("th",{children:e},s)))]})}),(0,r.jsx)("tbody",{children:n.map(((e,s)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,r.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},s);var t}))]},s)))})]})})}},8205:(e,s,t)=>{t.d(s,{A:()=>n});t(6540);var r=t(4848);const n=e=>{let{data:s}=e,t=[],n=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",t=e.index||[],n=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const o=n.map((e=>JSON.stringify(e)));return(0,r.jsxs)("div",{className:"series-container",children:[(0,r.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,r.jsxs)("li",{className:"series-item",children:[(0,r.jsx)("span",{className:"series-index",children:t[s]}),(0,r.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,r.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>o});var r=t(6540);const n={},a=r.createContext(n);function i(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/83aa63f8.e3a12dc4.js b/assets/js/83aa63f8.e3a12dc4.js deleted file mode 100644 index e1443409..00000000 --- a/assets/js/83aa63f8.e3a12dc4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4049],{9866:e=>{e.exports=JSON.parse('{"metadata":{"permalink":"/bpd-reference/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":4,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); \ No newline at end of file diff --git a/assets/js/83b8ee67.1feae5ee.js b/assets/js/83b8ee67.1feae5ee.js deleted file mode 100644 index 5331781a..00000000 --- a/assets/js/83b8ee67.1feae5ee.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1417],{5392:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"Querying","description":"Create a new dataframe containing only rows satisfying a condition","slug":"/category/querying","permalink":"/bpd-reference/docs/category/querying","sidebar":"docsSidebar","navigation":{"previous":{"title":"list()","permalink":"/bpd-reference/docs/documentation/data format conversion/list()"},"next":{"title":"df[]","permalink":"/bpd-reference/docs/documentation/querying/df[]"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/85bbc213.59604264.js b/assets/js/85bbc213.59604264.js new file mode 100644 index 00000000..db386272 --- /dev/null +++ b/assets/js/85bbc213.59604264.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9797],{2e3:e=>{e.exports=JSON.parse('{"permalink":"/bpd-reference/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":4,"blogDescription":"Blog","blogTitle":"Blog"}')}}]); \ No newline at end of file diff --git a/assets/js/8b4ce11c.bc80e777.js b/assets/js/8b4ce11c.bc80e777.js deleted file mode 100644 index 745b65b7..00000000 --- a/assets/js/8b4ce11c.bc80e777.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5848],{779:e=>{e.exports=JSON.parse('{"tag":{"label":"querying","permalink":"/bpd-reference/docs/tags/querying","allTagsPath":"/bpd-reference/docs/tags","count":3,"items":[{"id":"statistical-inference/hypothesis_test","title":"Hypothesis Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/hypothesis_test"},{"id":"statistical-inference/permutation_test","title":"Permutation Test","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/permutation_test"},{"id":"statistical-inference/standard_units","title":"Standard Units, Correlation, Regression","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/standard_units"}],"unlisted":false}}')}}]); \ No newline at end of file diff --git a/assets/js/8c496670.dc29cff5.js b/assets/js/8c496670.3ecad696.js similarity index 68% rename from assets/js/8c496670.dc29cff5.js rename to assets/js/8c496670.3ecad696.js index 2db036aa..9cf58df5 100644 --- a/assets/js/8c496670.dc29cff5.js +++ b/assets/js/8c496670.3ecad696.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9572],{9108:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var a=n(4848),t=n(8453),o=n(8597),r=n(8205);const i={sidebar_position:2},d=void 0,c={id:"documentation/querying/df[]",title:"df[]",description:"df[condition]",source:"@site/docs/documentation/querying/df[].md",sourceDirName:"documentation/querying",slug:"/documentation/querying/df[]",permalink:"/bpd-reference/docs/documentation/querying/df[]",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/querying/df[].md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"Querying",permalink:"/bpd-reference/docs/category/querying"},next:{title:"Writing Functions",permalink:"/bpd-reference/docs/documentation/Functions/Writing Functions"}},l={},h=[];function g(e){const s={code:"code",hr:"hr",pre:"pre",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"df[condition]"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Creates a new dataframe containing only the rows that satisfy a specific condition. "})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["condition : ",(0,a.jsx)("em",{children:"bool"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:" A sequence of boolean values with length equal to the number of rows of the DataFrame."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsx)("dd",{children:"new_df - A new DataFrame that contains only the rows whose corresponding element in condition is True."}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"DataFrame"})]})]}),"\n",(0,a.jsx)(s.hr,{}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" Series of bools of if Species is a dog AND Color is white "})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"(pets.get('Species')=='dog') & (pets.get('Color')=='white')\n"})}),"\n",(0,a.jsx)(r.A,{data:'{"name":"Species is a dog AND color is white","index":[0,1,2,3,4,5,6,7],"data":[false,false,false,true,false,false,false,false]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" DataFrame where Species is a dog AND Color is white "})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[(pets.get('Species')=='dog') & (pets.get('Color')=='white')]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[3],"data":[["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."]]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" Series of bools where Species is a dog OR Color is white"})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"(pets.get('Species')=='dog') | (pets.get('Color')=='white')\n"})}),"\n",(0,a.jsx)(r.A,{data:'{"name":"Species is a dog OR color is white","index":[0,1,2,3,4,5,6,7],"data":[true,false,false,true,true,false,false,false]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" DataFrame where Species is a dog OR Color is white"})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[(pets.get('Species')=='dog') | (pets.get('Color')=='white')]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Some other examples!"})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets.get('Weight') >= 25]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets[(pets.get('Weight') >= 25) & (pets.get('Weight') < 80)]]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets[pets.get('Color').str.contains('e')]]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[1,3,6],"data":[["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets1 = pets.set_index('ID')\r\npets1[pets1.index.str.contains('cat')]]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":["cat_001","cat_002","cat_003"],"data":[["cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets.index > 3]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[4,5,6,7],"data":[["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'})]})}function p(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(g,{...e})}):g(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var a=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],o="",r=[];if(s){const e=JSON.parse(s);n=e.columns||[],t=e.data||[],o=e.indexName||"Index",r=e.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:o}),n.map(((e,s)=>(0,a.jsx)("th",{children:e},s)))]})}),(0,a.jsx)("tbody",{children:t.map(((e,s)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:r[s]}),e.map(((e,s)=>{return(0,a.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var a=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],o="",r="";if(s)try{const e=JSON.parse(s);o=e.name||"",r=e.dtype||"Unknown type",n=e.index||[],t=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=t.map((e=>JSON.stringify(e)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:i.map(((e,s)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:n[s]}),(0,a.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",o,", dtype: ",r]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>i});var a=n(6540);const t={},o=a.createContext(t);function r(e){const s=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),a.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9572],{9108:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var a=n(4848),t=n(8453),o=n(8597),r=n(8205);const i={sidebar_position:2},d=void 0,c={id:"documentation/querying/df[]",title:"df[]",description:"df[condition]",source:"@site/docs/documentation/querying/df[].md",sourceDirName:"documentation/querying",slug:"/documentation/querying/df[]",permalink:"/bpd-reference/docs/documentation/querying/df[]",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/querying/df[].md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"Querying",permalink:"/bpd-reference/docs/category/querying"},next:{title:"Writing Functions",permalink:"/bpd-reference/docs/documentation/Functions/Writing Functions"}},l={},h=[];function g(e){const s={code:"code",hr:"hr",pre:"pre",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"df[condition]"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Creates a new dataframe containing only the rows that satisfy a specific condition. "})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["condition : ",(0,a.jsx)("em",{children:"bool"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:" A sequence of boolean values with length equal to the number of rows of the DataFrame."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsx)("dd",{children:"new_df - A new DataFrame that contains only the rows whose corresponding element in condition is True."}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"DataFrame"})]})]}),"\n",(0,a.jsx)(s.hr,{}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" Series of bools of if Species is a dog AND Color is white "})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"(pets.get('Species')=='dog') & (pets.get('Color')=='white')\n"})}),"\n",(0,a.jsx)(r.A,{data:'{"name":"Species is a dog AND color is white","index":[0,1,2,3,4,5,6,7],"data":[false,false,false,true,false,false,false,false]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" DataFrame where Species is a dog AND Color is white "})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[(pets.get('Species')=='dog') & (pets.get('Color')=='white')]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[3],"data":[["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."]]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" Series of bools where Species is a dog OR Color is white"})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"(pets.get('Species')=='dog') | (pets.get('Color')=='white')\n"})}),"\n",(0,a.jsx)(r.A,{data:'{"name":"Species is a dog OR color is white","index":[0,1,2,3,4,5,6,7],"data":[true,false,false,true,true,false,false,false]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:" DataFrame where Species is a dog OR Color is white"})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[(pets.get('Species')=='dog') | (pets.get('Color')=='white')]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"Some other examples!"})}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets.get('Weight') >= 25]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets[(pets.get('Weight') >= 25) & (pets.get('Weight') < 80)]]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets[pets.get('Color').str.contains('e')]]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[1,3,6],"data":[["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets1 = pets.set_index('ID')\npets1[pets1.index.str.contains('cat')]]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":["cat_001","cat_002","cat_003"],"data":[["cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,a.jsx)(s.pre,{children:(0,a.jsx)(s.code,{className:"language-python",children:"pets[pets.index > 3]\n"})}),"\n",(0,a.jsx)(o.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[4,5,6,7],"data":[["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'})]})}function p(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(g,{...e})}):g(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var a=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],o="",r=[];if(s){const e=JSON.parse(s);n=e.columns||[],t=e.data||[],o=e.indexName||"Index",r=e.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:o}),n.map(((e,s)=>(0,a.jsx)("th",{children:e},s)))]})}),(0,a.jsx)("tbody",{children:t.map(((e,s)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:r[s]}),e.map(((e,s)=>{return(0,a.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>t});n(6540);var a=n(4848);const t=e=>{let{data:s}=e,n=[],t=[],o="",r="";if(s)try{const e=JSON.parse(s);o=e.name||"",r=e.dtype||"Unknown type",n=e.index||[],t=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const i=t.map((e=>JSON.stringify(e)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:i.map(((e,s)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:n[s]}),(0,a.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",o,", dtype: ",r]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>i});var a=n(6540);const t={},o=a.createContext(t);function r(e){const s=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),a.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8d72dfa8.c6550015.js b/assets/js/8d72dfa8.c6550015.js deleted file mode 100644 index 31d57726..00000000 --- a/assets/js/8d72dfa8.c6550015.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1429],{9468:e=>{e.exports=JSON.parse('{"categoryGeneratedIndex":{"title":"if-statements","description":"Conditionals","slug":"/category/if-statements","permalink":"/bpd-reference/docs/category/if-statements","sidebar":"docsSidebar","navigation":{"previous":{"title":"for-loops","permalink":"/bpd-reference/docs/documentation/for-loops/"},"next":{"title":"if-elif-else","permalink":"/bpd-reference/docs/documentation/if-statements/if-elif-else"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/920988e2.1a73d040.js b/assets/js/920988e2.1a73d040.js new file mode 100644 index 00000000..3967a90b --- /dev/null +++ b/assets/js/920988e2.1a73d040.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6690],{1399:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>l,frontMatter:()=>t,metadata:()=>c,toc:()=>o});var a=r(4848),s=r(8453);r(8597),r(8205);const t={sidebar_position:1},d=void 0,c={id:"documentation/arrays-and-numpy/np.append()",title:"np.append()",description:"np.append(arr, value)",source:"@site/docs/documentation/arrays-and-numpy/np.append().md",sourceDirName:"documentation/arrays-and-numpy",slug:"/documentation/arrays-and-numpy/np.append()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.append()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/arrays-and-numpy/np.append().md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"arr[]",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/arr[]"},next:{title:"np.arange()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.arange()"}},i={},o=[];function p(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"np.append(arr, value)"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"A copy of arr with value appended to the end. This does not\nchange arr unless you store the result in arr."})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["arr : ",(0,a.jsx)("em",{children:"array"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"The original array to which a value will be appended."}),(0,a.jsxs)("dd",{className:"parameter",children:["value : ",(0,a.jsx)("em",{children:"any type"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"The value to append to the array."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsx)("dd",{children:"new_arr - a new array containing the elements of the original array followed by the appended value"}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"array"})]})]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"np.append(weight_arr, 2)\n"})}),"\n",(0,a.jsx)(n.p,{children:"array([40. , 1.5 , 15. , 80. , 25. , 1. , 0.25, 10. , 2. ])"})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},8597:(e,n,r)=>{r.d(n,{A:()=>s});r(6540);var a=r(4848);const s=e=>{let{data:n}=e,r=[],s=[],t="",d=[];if(n){const e=JSON.parse(n);r=e.columns||[],s=e.data||[],t=e.indexName||"Index",d=e.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:t}),r.map(((e,n)=>(0,a.jsx)("th",{children:e},n)))]})}),(0,a.jsx)("tbody",{children:s.map(((e,n)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:d[n]}),e.map(((e,n)=>{return(0,a.jsx)("td",{children:(r=e,"boolean"==typeof r?r.toString().charAt(0).toUpperCase()+r.toString().slice(1):r)},n);var r}))]},n)))})]})})}},8205:(e,n,r)=>{r.d(n,{A:()=>s});r(6540);var a=r(4848);const s=e=>{let{data:n}=e,r=[],s=[],t="",d="";if(n)try{const e=JSON.parse(n);t=e.name||"",d=e.dtype||"Unknown type",r=e.index||[],s=e.data||[]}catch(i){console.error("Error parsing data prop in SeriesComponent:",i)}const c=s.map((e=>JSON.stringify(e)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:c.map(((e,n)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:r[n]}),(0,a.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",t,", dtype: ",d]})]})}},8453:(e,n,r)=>{r.d(n,{R:()=>d,x:()=>c});var a=r(6540);const s={},t=a.createContext(s);function d(e){const n=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),a.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/920988e2.d63c6515.js b/assets/js/920988e2.d63c6515.js deleted file mode 100644 index 9729c022..00000000 --- a/assets/js/920988e2.d63c6515.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[6690],{1399:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>l,frontMatter:()=>t,metadata:()=>c,toc:()=>o});var a=r(4848),s=r(8453);r(8597),r(8205);const t={sidebar_position:1},d=void 0,c={id:"documentation/arrays-and-numpy/np.append()",title:"np.append()",description:"np.append(arr, value)",source:"@site/docs/documentation/arrays-and-numpy/np.append().md",sourceDirName:"documentation/arrays-and-numpy",slug:"/documentation/arrays-and-numpy/np.append()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.append()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/arrays-and-numpy/np.append().md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",previous:{title:"arr[]",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/arr[]"},next:{title:"np.arange()",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/np.arange()"}},i={},o=[];function p(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("code",{children:"np.append(arr, value)"}),"\n",(0,a.jsxs)("div",{className:"base",children:[(0,a.jsx)("p",{children:(0,a.jsx)("strong",{children:"A copy of arr with value appended to the end. This does not\r\nchange arr unless you store the result in arr."})}),(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"term",children:"Input:"}),(0,a.jsxs)("dd",{className:"parameter",children:["arr : ",(0,a.jsx)("em",{children:"array"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"The original array to which a value will be appended."}),(0,a.jsxs)("dd",{className:"parameter",children:["value : ",(0,a.jsx)("em",{children:"any type"})]}),(0,a.jsx)("dd",{className:"parameter-description",children:"The value to append to the array."}),(0,a.jsx)("dt",{className:"term",children:"Returns:"}),(0,a.jsx)("dd",{children:"new_arr - a new array containing the elements of the original array followed by the appended value"}),(0,a.jsx)("dt",{className:"term",children:"Return Type:"}),(0,a.jsx)("dd",{children:"array"})]})]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:"np.append(weight_arr, 2)\n"})}),"\n",(0,a.jsx)(n.p,{children:"array([40. , 1.5 , 15. , 80. , 25. , 1. , 0.25, 10. , 2. ])"})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},8597:(e,n,r)=>{r.d(n,{A:()=>s});r(6540);var a=r(4848);const s=e=>{let{data:n}=e,r=[],s=[],t="",d=[];if(n){const e=JSON.parse(n);r=e.columns||[],s=e.data||[],t=e.indexName||"Index",d=e.index||[]}return(0,a.jsx)("div",{className:"dataframe-container",children:(0,a.jsxs)("table",{className:"dataframe-table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:t}),r.map(((e,n)=>(0,a.jsx)("th",{children:e},n)))]})}),(0,a.jsx)("tbody",{children:s.map(((e,n)=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"index-value",children:d[n]}),e.map(((e,n)=>{return(0,a.jsx)("td",{children:(r=e,"boolean"==typeof r?r.toString().charAt(0).toUpperCase()+r.toString().slice(1):r)},n);var r}))]},n)))})]})})}},8205:(e,n,r)=>{r.d(n,{A:()=>s});r(6540);var a=r(4848);const s=e=>{let{data:n}=e,r=[],s=[],t="",d="";if(n)try{const e=JSON.parse(n);t=e.name||"",d=e.dtype||"Unknown type",r=e.index||[],s=e.data||[]}catch(i){console.error("Error parsing data prop in SeriesComponent:",i)}const c=s.map((e=>JSON.stringify(e)));return(0,a.jsxs)("div",{className:"series-container",children:[(0,a.jsx)("ul",{className:"series-list",children:c.map(((e,n)=>(0,a.jsxs)("li",{className:"series-item",children:[(0,a.jsx)("span",{className:"series-index",children:r[n]}),(0,a.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,a.jsxs)("div",{className:"series-footer",children:["Name: ",t,", dtype: ",d]})]})}},8453:(e,n,r)=>{r.d(n,{R:()=>d,x:()=>c});var a=r(6540);const s={},t=a.createContext(s);function d(e){const n=a.useContext(t);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),a.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.03c5496c.js b/assets/js/935f2afb.03c5496c.js new file mode 100644 index 00000000..55441b25 --- /dev/null +++ b/assets/js/935f2afb.03c5496c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[8581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"Intro","href":"/bpd-reference/docs/documentation/intro","docId":"documentation/intro","unlisted":false},{"type":"category","label":"Building and Organizing DataFrames","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"bpd.DataFrame()","href":"/bpd-reference/docs/documentation/building-organizing/bpd.DataFrame()","docId":"documentation/building-organizing/bpd.DataFrame()","unlisted":false},{"type":"link","label":"bpd.read_csv()","href":"/bpd-reference/docs/documentation/building-organizing/bpd.read_csv()","docId":"documentation/building-organizing/bpd.read_csv()","unlisted":false},{"type":"link","label":"df.assign()","href":"/bpd-reference/docs/documentation/building-organizing/df.assign()","docId":"documentation/building-organizing/df.assign()","unlisted":false},{"type":"link","label":"df.drop()","href":"/bpd-reference/docs/documentation/building-organizing/df.drop()","docId":"documentation/building-organizing/df.drop()","unlisted":false},{"type":"link","label":"df.set_index()","href":"/bpd-reference/docs/documentation/building-organizing/df.set_index()","docId":"documentation/building-organizing/df.set_index()","unlisted":false},{"type":"link","label":"df.reset_index()","href":"/bpd-reference/docs/documentation/building-organizing/df.reset_index()","docId":"documentation/building-organizing/df.reset_index()","unlisted":false},{"type":"link","label":"df.sort_values()","href":"/bpd-reference/docs/documentation/building-organizing/df.sort_values()","docId":"documentation/building-organizing/df.sort_values()","unlisted":false},{"type":"link","label":"df.merge()","href":"/bpd-reference/docs/documentation/building-organizing/df.merge()","docId":"documentation/building-organizing/df.merge()","unlisted":false}],"href":"/bpd-reference/docs/documentation/building-organizing/"},{"type":"category","label":"Accessing Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"df.shape","href":"/bpd-reference/docs/documentation/accessing-data/df.shape","docId":"documentation/accessing-data/df.shape","unlisted":false},{"type":"link","label":"df.get()","href":"/bpd-reference/docs/documentation/accessing-data/df.get()","docId":"documentation/accessing-data/df.get()","unlisted":false},{"type":"link","label":"ser.loc[]","href":"/bpd-reference/docs/documentation/accessing-data/ser.loc[]","docId":"documentation/accessing-data/ser.loc[]","unlisted":false},{"type":"link","label":"ser.iloc[]","href":"/bpd-reference/docs/documentation/accessing-data/ser.iloc[]","docId":"documentation/accessing-data/ser.iloc[]","unlisted":false},{"type":"link","label":"df.index","href":"/bpd-reference/docs/documentation/accessing-data/df.index","docId":"documentation/accessing-data/df.index","unlisted":false},{"type":"link","label":"df.columns","href":"/bpd-reference/docs/documentation/accessing-data/df.columns","docId":"documentation/accessing-data/df.columns","unlisted":false},{"type":"link","label":"df.take()","href":"/bpd-reference/docs/documentation/accessing-data/df.take()","docId":"documentation/accessing-data/df.take()","unlisted":false}],"href":"/bpd-reference/docs/documentation/accessing-data/"},{"type":"category","label":"Series Methods","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"ser.count()","href":"/bpd-reference/docs/documentation/series-methods/ser.count()","docId":"documentation/series-methods/ser.count()","unlisted":false},{"type":"link","label":"ser.max()","href":"/bpd-reference/docs/documentation/series-methods/ser.max()","docId":"documentation/series-methods/ser.max()","unlisted":false},{"type":"link","label":"ser.min()","href":"/bpd-reference/docs/documentation/series-methods/ser.min()","docId":"documentation/series-methods/ser.min()","unlisted":false},{"type":"link","label":"ser.sum()","href":"/bpd-reference/docs/documentation/series-methods/ser.sum()","docId":"documentation/series-methods/ser.sum()","unlisted":false},{"type":"link","label":"ser.mean()","href":"/bpd-reference/docs/documentation/series-methods/ser.mean()","docId":"documentation/series-methods/ser.mean()","unlisted":false},{"type":"link","label":"ser.median()","href":"/bpd-reference/docs/documentation/series-methods/ser.median()","docId":"documentation/series-methods/ser.median()","unlisted":false},{"type":"link","label":"ser.unique()","href":"/bpd-reference/docs/documentation/series-methods/ser.unique()","docId":"documentation/series-methods/ser.unique()","unlisted":false},{"type":"link","label":"ser.str.split()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.split()","docId":"documentation/series-methods/ser.str.split()","unlisted":false},{"type":"link","label":"ser.str.strip()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.strip()","docId":"documentation/series-methods/ser.str.strip()","unlisted":false},{"type":"link","label":"ser.str.lower()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.lower()","docId":"documentation/series-methods/ser.str.lower()","unlisted":false},{"type":"link","label":"ser.str.upper()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.upper()","docId":"documentation/series-methods/ser.str.upper()","unlisted":false},{"type":"link","label":"ser.str.capitalize()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.capitalize()","docId":"documentation/series-methods/ser.str.capitalize()","unlisted":false},{"type":"link","label":"ser.str.title()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.title()","docId":"documentation/series-methods/ser.str.title()","unlisted":false},{"type":"link","label":"ser.str.replace()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.replace()","docId":"documentation/series-methods/ser.str.replace()","unlisted":false},{"type":"link","label":"ser.str.len()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.len()","docId":"documentation/series-methods/ser.str.len()","unlisted":false},{"type":"link","label":"ser.str.contains()","href":"/bpd-reference/docs/documentation/series-methods/ser.str.contains()","docId":"documentation/series-methods/ser.str.contains()","unlisted":false}],"href":"/bpd-reference/docs/documentation/series-methods/"},{"type":"category","label":"Arrays and NumPy","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"arr[]","href":"/bpd-reference/docs/documentation/arrays-and-numpy/arr[]","docId":"documentation/arrays-and-numpy/arr[]","unlisted":false},{"type":"link","label":"np.append()","href":"/bpd-reference/docs/documentation/arrays-and-numpy/np.append()","docId":"documentation/arrays-and-numpy/np.append()","unlisted":false},{"type":"link","label":"np.arange()","href":"/bpd-reference/docs/documentation/arrays-and-numpy/np.arange()","docId":"documentation/arrays-and-numpy/np.arange()","unlisted":false},{"type":"link","label":"np.count_nonzero()","href":"/bpd-reference/docs/documentation/arrays-and-numpy/np.count_nonzero()","docId":"documentation/arrays-and-numpy/np.count_nonzero()","unlisted":false},{"type":"link","label":"np.percentile()","href":"/bpd-reference/docs/documentation/arrays-and-numpy/np.percentile()","docId":"documentation/arrays-and-numpy/np.percentile()","unlisted":false},{"type":"link","label":"np.round()","href":"/bpd-reference/docs/documentation/arrays-and-numpy/np.round()","docId":"documentation/arrays-and-numpy/np.round()","unlisted":false}],"href":"/bpd-reference/docs/documentation/arrays-and-numpy/"},{"type":"category","label":"Plotting","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Histogram","href":"/bpd-reference/docs/documentation/plotting/Histogram","docId":"documentation/plotting/Histogram","unlisted":false},{"type":"link","label":"Scatter Plot","href":"/bpd-reference/docs/documentation/plotting/Scatter Plot","docId":"documentation/plotting/Scatter Plot","unlisted":false},{"type":"link","label":"Bar Plot","href":"/bpd-reference/docs/documentation/plotting/Bar Plot","docId":"documentation/plotting/Bar Plot","unlisted":false},{"type":"link","label":"Line Plot","href":"/bpd-reference/docs/documentation/plotting/Line Plot","docId":"documentation/plotting/Line Plot","unlisted":false}],"href":"/bpd-reference/docs/documentation/plotting/"},{"type":"link","label":"for-loops","href":"/bpd-reference/docs/documentation/for-loops/","docId":"documentation/for-loops/for-loops","unlisted":false},{"type":"category","label":"if-statements","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"if-elif-else","href":"/bpd-reference/docs/documentation/if-statements/if-elif-else","docId":"documentation/if-statements/if-elif-else","unlisted":false},{"type":"link","label":"in \u2044 not in","href":"/bpd-reference/docs/documentation/if-statements/in \u2044 not in","docId":"documentation/if-statements/in \u2044 not in","unlisted":false},{"type":"link","label":"Logical Operators","href":"/bpd-reference/docs/documentation/if-statements/Logical Operators","docId":"documentation/if-statements/Logical Operators","unlisted":false}],"href":"/bpd-reference/docs/category/if-statements"},{"type":"category","label":"Data Format Conversion","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"np.array()","href":"/bpd-reference/docs/documentation/data format conversion/np.array()","docId":"documentation/data format conversion/np.array()","unlisted":false},{"type":"link","label":"list()","href":"/bpd-reference/docs/documentation/data format conversion/list()","docId":"documentation/data format conversion/list()","unlisted":false}],"href":"/bpd-reference/docs/documentation/data format conversion/"},{"type":"category","label":"Querying","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"df[]","href":"/bpd-reference/docs/documentation/querying/df[]","docId":"documentation/querying/df[]","unlisted":false}],"href":"/bpd-reference/docs/category/querying"},{"type":"category","label":"Functions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Writing Functions","href":"/bpd-reference/docs/documentation/Functions/Writing Functions","docId":"documentation/Functions/Writing Functions","unlisted":false},{"type":"link","label":"Applying Functions","href":"/bpd-reference/docs/documentation/Functions/Applying Functions","docId":"documentation/Functions/Applying Functions","unlisted":false}]},{"type":"category","label":"Grouping","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"groupby","href":"/bpd-reference/docs/documentation/Grouping/groupby","docId":"documentation/Grouping/groupby","unlisted":false},{"type":"category","label":"aggregation","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"count()","href":"/bpd-reference/docs/documentation/Grouping/aggregation/count()","docId":"documentation/Grouping/aggregation/count()","unlisted":false},{"type":"link","label":"max()","href":"/bpd-reference/docs/documentation/Grouping/aggregation/max()","docId":"documentation/Grouping/aggregation/max()","unlisted":false},{"type":"link","label":"mean()","href":"/bpd-reference/docs/documentation/Grouping/aggregation/mean()","docId":"documentation/Grouping/aggregation/mean()","unlisted":false},{"type":"link","label":"median()","href":"/bpd-reference/docs/documentation/Grouping/aggregation/median()","docId":"documentation/Grouping/aggregation/median()","unlisted":false},{"type":"link","label":"min()","href":"/bpd-reference/docs/documentation/Grouping/aggregation/min()","docId":"documentation/Grouping/aggregation/min()","unlisted":false},{"type":"link","label":"sum()","href":"/bpd-reference/docs/documentation/Grouping/aggregation/sum()","docId":"documentation/Grouping/aggregation/sum()","unlisted":false}]}]}],"statsSidebar":[{"type":"link","label":"Intro","href":"/bpd-reference/docs/statistical-inference/intro","docId":"statistical-inference/intro","unlisted":false},{"type":"category","label":"Random Sampling","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Sampling","href":"/bpd-reference/docs/statistical-inference/random sampling/sampling","docId":"statistical-inference/random sampling/sampling","unlisted":false},{"type":"link","label":"np.random.choice()","href":"/bpd-reference/docs/statistical-inference/random sampling/np.random.choice()","docId":"statistical-inference/random sampling/np.random.choice()","unlisted":false}]},{"type":"link","label":"Parameters and Statistics","href":"/bpd-reference/docs/statistical-inference/parameters-and-statistics","docId":"statistical-inference/parameters-and-statistics","unlisted":false},{"type":"link","label":"Null & Alternative Hypothesis","href":"/bpd-reference/docs/statistical-inference/null_and_alt","docId":"statistical-inference/null_and_alt","unlisted":false},{"type":"link","label":"Observed & Test Statistic","href":"/bpd-reference/docs/statistical-inference/obs_and_test_stats","docId":"statistical-inference/obs_and_test_stats","unlisted":false},{"type":"link","label":"P-value","href":"/bpd-reference/docs/statistical-inference/p_value","docId":"statistical-inference/p_value","unlisted":false},{"type":"link","label":"Hypothesis Test","href":"/bpd-reference/docs/statistical-inference/hypothesis_test","docId":"statistical-inference/hypothesis_test","unlisted":false},{"type":"link","label":"Permutation Test","href":"/bpd-reference/docs/statistical-inference/permutation_test","docId":"statistical-inference/permutation_test","unlisted":false},{"type":"link","label":"The Standard Normal Distribution","href":"/bpd-reference/docs/statistical-inference/standard_normal_distribution","docId":"statistical-inference/standard_normal_distribution","unlisted":false},{"type":"link","label":"Standard Units, Correlation, Regression","href":"/bpd-reference/docs/statistical-inference/standard_units","docId":"statistical-inference/standard_units","unlisted":false},{"type":"link","label":"Boostrapping and Confidence Intervals","href":"/bpd-reference/docs/statistical-inference/bootstrapping","docId":"statistical-inference/bootstrapping","unlisted":false},{"type":"category","label":"Concept Check","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Hypothesis Test vs. Permutation Test","href":"/bpd-reference/docs/statistical-inference/concept check/hypothesis_vs_permutation","docId":"statistical-inference/concept check/hypothesis_vs_permutation","unlisted":false}]}]},"docs":{"documentation/accessing-data/df.columns":{"id":"documentation/accessing-data/df.columns","title":"df.columns","description":"df.columns","sidebar":"docsSidebar"},"documentation/accessing-data/df.get()":{"id":"documentation/accessing-data/df.get()","title":"df.get()","description":"df.get(columnname)ordf.get([col1name, ..., colk_name])","sidebar":"docsSidebar"},"documentation/accessing-data/df.index":{"id":"documentation/accessing-data/df.index","title":"df.index","description":"df.index","sidebar":"docsSidebar"},"documentation/accessing-data/df.shape":{"id":"documentation/accessing-data/df.shape","title":"df.shape","description":"df.shape","sidebar":"docsSidebar"},"documentation/accessing-data/df.take()":{"id":"documentation/accessing-data/df.take()","title":"df.take()","description":"df.take(indices)","sidebar":"docsSidebar"},"documentation/accessing-data/index":{"id":"documentation/accessing-data/index","title":"Accessing Data","description":"df.shape","sidebar":"docsSidebar"},"documentation/accessing-data/ser.iloc[]":{"id":"documentation/accessing-data/ser.iloc[]","title":"ser.iloc[]","description":"ser.iloc[position]","sidebar":"docsSidebar"},"documentation/accessing-data/ser.loc[]":{"id":"documentation/accessing-data/ser.loc[]","title":"ser.loc[]","description":"ser.loc[label]","sidebar":"docsSidebar"},"documentation/arrays-and-numpy/arr[]":{"id":"documentation/arrays-and-numpy/arr[]","title":"arr[]","description":"arr[index]","sidebar":"docsSidebar"},"documentation/arrays-and-numpy/index":{"id":"documentation/arrays-and-numpy/index","title":"Arrays and NumPy","description":"Functions/methods for working with Arrays and NumPy.","sidebar":"docsSidebar"},"documentation/arrays-and-numpy/np.append()":{"id":"documentation/arrays-and-numpy/np.append()","title":"np.append()","description":"np.append(arr, value)","sidebar":"docsSidebar"},"documentation/arrays-and-numpy/np.arange()":{"id":"documentation/arrays-and-numpy/np.arange()","title":"np.arange()","description":"np.arange(start, stop, step)","sidebar":"docsSidebar"},"documentation/arrays-and-numpy/np.count_nonzero()":{"id":"documentation/arrays-and-numpy/np.count_nonzero()","title":"np.count_nonzero()","description":"np.count_nonzero(arr)","sidebar":"docsSidebar"},"documentation/arrays-and-numpy/np.percentile()":{"id":"documentation/arrays-and-numpy/np.percentile()","title":"np.percentile()","description":"np.percentile(arr, p)","sidebar":"docsSidebar"},"documentation/arrays-and-numpy/np.round()":{"id":"documentation/arrays-and-numpy/np.round()","title":"np.round()","description":"np.round(arr, decimals)","sidebar":"docsSidebar"},"documentation/building-organizing/bpd.DataFrame()":{"id":"documentation/building-organizing/bpd.DataFrame()","title":"bpd.DataFrame()","description":"bpd.DataFrame()","sidebar":"docsSidebar"},"documentation/building-organizing/bpd.read_csv()":{"id":"documentation/building-organizing/bpd.read_csv()","title":"bpd.read_csv()","description":"bpd.read_csv(filepath)","sidebar":"docsSidebar"},"documentation/building-organizing/df.assign()":{"id":"documentation/building-organizing/df.assign()","title":"df.assign()","description":"df.assign(nameofcolumn=column_data)","sidebar":"docsSidebar"},"documentation/building-organizing/df.drop()":{"id":"documentation/building-organizing/df.drop()","title":"df.drop()","description":"df.drop(columns=columnname or [col1name, ..., colk_name])","sidebar":"docsSidebar"},"documentation/building-organizing/df.merge()":{"id":"documentation/building-organizing/df.merge()","title":"df.merge()","description":"df.merge(right, on=column, lefton=leftcolumn, righton=rightcolumn, leftindex=False, rightindex=False)","sidebar":"docsSidebar"},"documentation/building-organizing/df.reset_index()":{"id":"documentation/building-organizing/df.reset_index()","title":"df.reset_index()","description":"df.reset_index(drop=False)","sidebar":"docsSidebar"},"documentation/building-organizing/df.set_index()":{"id":"documentation/building-organizing/df.set_index()","title":"df.set_index()","description":"df.setindex(columnname)","sidebar":"docsSidebar"},"documentation/building-organizing/df.sort_values()":{"id":"documentation/building-organizing/df.sort_values()","title":"df.sort_values()","description":"df.sortvalues(by=columnname, ascending=True)","sidebar":"docsSidebar"},"documentation/building-organizing/index":{"id":"documentation/building-organizing/index","title":"Building and Organizing DataFrames","description":"Each function/method creates a new DataFrame. Remember to save it!","sidebar":"docsSidebar"},"documentation/data format conversion/index":{"id":"documentation/data format conversion/index","title":"Data Format Conversion","description":"Converting things to arrays!","sidebar":"docsSidebar"},"documentation/data format conversion/list()":{"id":"documentation/data format conversion/list()","title":"list()","description":"list(arr)","sidebar":"docsSidebar"},"documentation/data format conversion/np.array()":{"id":"documentation/data format conversion/np.array()","title":"np.array()","description":"np.array(input)","sidebar":"docsSidebar"},"documentation/for-loops/for-loops":{"id":"documentation/for-loops/for-loops","title":"for-loops","description":"for \\\\ in \\\\:","sidebar":"docsSidebar"},"documentation/Functions/Applying Functions":{"id":"documentation/Functions/Applying Functions","title":"Applying Functions","description":"df.get(columnname).apply(functionname)","sidebar":"docsSidebar"},"documentation/Functions/Writing Functions":{"id":"documentation/Functions/Writing Functions","title":"Writing Functions","description":"def function_name(parameters):","sidebar":"docsSidebar"},"documentation/Grouping/aggregation/count()":{"id":"documentation/Grouping/aggregation/count()","title":"count()","description":"df.groupby(column_name).count()","sidebar":"docsSidebar"},"documentation/Grouping/aggregation/max()":{"id":"documentation/Grouping/aggregation/max()","title":"max()","description":"df.groupby(column_name).max()","sidebar":"docsSidebar"},"documentation/Grouping/aggregation/mean()":{"id":"documentation/Grouping/aggregation/mean()","title":"mean()","description":"df.groupby(column_name).mean()","sidebar":"docsSidebar"},"documentation/Grouping/aggregation/median()":{"id":"documentation/Grouping/aggregation/median()","title":"median()","description":"df.groupby(column_name).median()","sidebar":"docsSidebar"},"documentation/Grouping/aggregation/min()":{"id":"documentation/Grouping/aggregation/min()","title":"min()","description":"df.groupby(column_name).min()","sidebar":"docsSidebar"},"documentation/Grouping/aggregation/sum()":{"id":"documentation/Grouping/aggregation/sum()","title":"sum()","description":"df.groupby(column_name).sum()","sidebar":"docsSidebar"},"documentation/Grouping/groupby":{"id":"documentation/Grouping/groupby","title":"groupby","description":"df.groupby(columnname)ordf.groupby([columnnames])","sidebar":"docsSidebar"},"documentation/if-statements/if-elif-else":{"id":"documentation/if-statements/if-elif-else","title":"if-elif-else","description":"Conditionally execute code. The elif and else blocks are optional.","sidebar":"docsSidebar"},"documentation/if-statements/in \u2044 not in":{"id":"documentation/if-statements/in \u2044 not in","title":"in \u2044 not in","description":"Checks for membership of object within a sequence.","sidebar":"docsSidebar"},"documentation/if-statements/Logical Operators":{"id":"documentation/if-statements/Logical Operators","title":"Logical Operators","description":"Allows for multiple conditions to be combined at the same time.","sidebar":"docsSidebar"},"documentation/intro":{"id":"documentation/intro","title":"intro","description":"Assumption: Assume that df is a DataFrame, ser is a Series, arr is an array, and we already run import babypandas as bpd and import numpy as np.","sidebar":"docsSidebar"},"documentation/plotting/Bar Plot":{"id":"documentation/plotting/Bar Plot","title":"Bar Plot","description":"df.plot(kind=\'bar\', x=datacol, y=datacol)","sidebar":"docsSidebar"},"documentation/plotting/Histogram":{"id":"documentation/plotting/Histogram","title":"Histogram","description":"df.plot(kind=\'hist\', y=datacol, bins=thebins, density=True, ec=\'w\')","sidebar":"docsSidebar"},"documentation/plotting/index":{"id":"documentation/plotting/index","title":"Plotting","description":"Plotting and visualization of DataFrames.","sidebar":"docsSidebar"},"documentation/plotting/Line Plot":{"id":"documentation/plotting/Line Plot","title":"Line Plot","description":"df.plot(kind=\'line\', x = datacol, y=datacol)","sidebar":"docsSidebar"},"documentation/plotting/Scatter Plot":{"id":"documentation/plotting/Scatter Plot","title":"Scatter Plot","description":"df.plot(kind=\'scatter\', x=datacol, y=datacol)","sidebar":"docsSidebar"},"documentation/querying/df[]":{"id":"documentation/querying/df[]","title":"df[]","description":"df[condition]","sidebar":"docsSidebar"},"documentation/series-methods/index":{"id":"documentation/series-methods/index","title":"Series Methods","description":"Methods that can be performed on a Series.","sidebar":"docsSidebar"},"documentation/series-methods/ser.count()":{"id":"documentation/series-methods/ser.count()","title":"ser.count()","description":"ser.count()","sidebar":"docsSidebar"},"documentation/series-methods/ser.max()":{"id":"documentation/series-methods/ser.max()","title":"ser.max()","description":"ser.max()","sidebar":"docsSidebar"},"documentation/series-methods/ser.mean()":{"id":"documentation/series-methods/ser.mean()","title":"ser.mean()","description":"ser.mean()","sidebar":"docsSidebar"},"documentation/series-methods/ser.median()":{"id":"documentation/series-methods/ser.median()","title":"ser.median()","description":"ser.median()","sidebar":"docsSidebar"},"documentation/series-methods/ser.min()":{"id":"documentation/series-methods/ser.min()","title":"ser.min()","description":"ser.min()","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.capitalize()":{"id":"documentation/series-methods/ser.str.capitalize()","title":"ser.str.capitalize()","description":"ser.str.capitalize()","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.contains()":{"id":"documentation/series-methods/ser.str.contains()","title":"ser.str.contains()","description":"ser.str.contains(substring)","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.len()":{"id":"documentation/series-methods/ser.str.len()","title":"ser.str.len()","description":"ser.str.len()","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.lower()":{"id":"documentation/series-methods/ser.str.lower()","title":"ser.str.lower()","description":"ser.str.lower()","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.replace()":{"id":"documentation/series-methods/ser.str.replace()","title":"ser.str.replace()","description":"ser.str.replace(old, new)","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.split()":{"id":"documentation/series-methods/ser.str.split()","title":"ser.str.split()","description":"ser.str.split(pat = None)","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.strip()":{"id":"documentation/series-methods/ser.str.strip()","title":"ser.str.strip()","description":"ser.str.strip(to_strip = None)","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.title()":{"id":"documentation/series-methods/ser.str.title()","title":"ser.str.title()","description":"ser.str.title()","sidebar":"docsSidebar"},"documentation/series-methods/ser.str.upper()":{"id":"documentation/series-methods/ser.str.upper()","title":"ser.str.upper()","description":"ser.str.upper()","sidebar":"docsSidebar"},"documentation/series-methods/ser.sum()":{"id":"documentation/series-methods/ser.sum()","title":"ser.sum()","description":"ser.sum()","sidebar":"docsSidebar"},"documentation/series-methods/ser.unique()":{"id":"documentation/series-methods/ser.unique()","title":"ser.unique()","description":"ser.unique()","sidebar":"docsSidebar"},"statistical-inference/bootstrapping":{"id":"statistical-inference/bootstrapping","title":"Bootstrapping and Confidence Intervals","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/concept check/hypothesis_vs_permutation":{"id":"statistical-inference/concept check/hypothesis_vs_permutation","title":"Hypothesis Test vs. Permutation Test","description":"Difference","sidebar":"statsSidebar"},"statistical-inference/hypothesis_test":{"id":"statistical-inference/hypothesis_test","title":"Hypothesis Test","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/intro":{"id":"statistical-inference/intro","title":"intro","description":"Assumption: Assume that df is a DataFrame, ser is a Series, arr is an array, and we already run import babypandas as bpd and import numpy as np.","sidebar":"statsSidebar"},"statistical-inference/null_and_alt":{"id":"statistical-inference/null_and_alt","title":"Null & Alternative Hypothesis","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/obs_and_test_stats":{"id":"statistical-inference/obs_and_test_stats","title":"Observed & Test Statistic","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/p_value":{"id":"statistical-inference/p_value","title":"P-value","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/parameters-and-statistics":{"id":"statistical-inference/parameters-and-statistics","title":"Parameters and Statistics","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/permutation_test":{"id":"statistical-inference/permutation_test","title":"Permutation Test","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/random sampling/np.random.choice()":{"id":"statistical-inference/random sampling/np.random.choice()","title":"np.random.choice()","description":"np.random.choice()","sidebar":"statsSidebar"},"statistical-inference/random sampling/sampling":{"id":"statistical-inference/random sampling/sampling","title":"Sampling","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/standard_normal_distribution":{"id":"statistical-inference/standard_normal_distribution","title":"The Standard Normal Distribution","description":"Concept","sidebar":"statsSidebar"},"statistical-inference/standard_units":{"id":"statistical-inference/standard_units","title":"Standard Units, Correlation, Regression","description":"Concept","sidebar":"statsSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/956f17b0.95f66799.js b/assets/js/956f17b0.95f66799.js new file mode 100644 index 00000000..062fe44e --- /dev/null +++ b/assets/js/956f17b0.95f66799.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5427],{7528:e=>{e.exports=JSON.parse('{"label":"hello","permalink":"/bpd-reference/blog/tags/hello","allTagsPath":"/bpd-reference/blog/tags","count":2,"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/9746c0ef.2880f7ec.js b/assets/js/9746c0ef.2880f7ec.js new file mode 100644 index 00000000..025961eb --- /dev/null +++ b/assets/js/9746c0ef.2880f7ec.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4638],{9849:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var t=n(4848),r=n(8453),a=(n(8597),n(8205));const i={sidebar_position:16},o=void 0,d={id:"documentation/series-methods/ser.str.contains()",title:"ser.str.contains()",description:"ser.str.contains(substring)",source:"@site/docs/documentation/series-methods/ser.str.contains().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.contains()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.contains()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.contains().md",tags:[],version:"current",sidebarPosition:16,frontMatter:{sidebar_position:16},sidebar:"docsSidebar",previous:{title:"ser.str.len()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.len()"},next:{title:"Arrays and NumPy",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/"}},c={},l=[];function m(e){const s={code:"code",hr:"hr",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.str.contains(substring)"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Tests if a substring is contained within each element of the Series."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Input:"}),(0,t.jsxs)("dd",{className:"parameter",children:["substring : ",(0,t.jsx)("em",{children:"string"})]}),(0,t.jsx)("dd",{className:"parameter-description",children:"String to search for."}),(0,t.jsx)("dt",{className:"term",children:"Returns:"}),(0,t.jsx)("dd",{children:"Returns a Series with a boolean value for each element expressing if each element contained the inputted substring."}),(0,t.jsx)("dt",{className:"term",children:"Return Type:"}),(0,t.jsx)("dd",{children:"Series"})]})]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\ncomment_ser\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser.str.contains('dog')\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"bool","index":[0,1,2,3,4,5,6,7],"data":[true,false,false,false,true,false,false,false]}'})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],a=e.indexName||"Index",i=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:a}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const o=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>o});var t=n(6540);const r={},a=t.createContext(r);function i(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9746c0ef.75ed6b19.js b/assets/js/9746c0ef.75ed6b19.js deleted file mode 100644 index 48ce398d..00000000 --- a/assets/js/9746c0ef.75ed6b19.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4638],{9849:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var t=n(4848),r=n(8453),a=(n(8597),n(8205));const i={sidebar_position:16},o=void 0,d={id:"documentation/series-methods/ser.str.contains()",title:"ser.str.contains()",description:"ser.str.contains(substring)",source:"@site/docs/documentation/series-methods/ser.str.contains().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.str.contains()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.contains()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.str.contains().md",tags:[],version:"current",sidebarPosition:16,frontMatter:{sidebar_position:16},sidebar:"docsSidebar",previous:{title:"ser.str.len()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.str.len()"},next:{title:"Arrays and NumPy",permalink:"/bpd-reference/docs/documentation/arrays-and-numpy/"}},c={},l=[];function m(e){const s={code:"code",hr:"hr",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.str.contains(substring)"}),"\n",(0,t.jsxs)("div",{className:"base",children:[(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Tests if a substring is contained within each element of the Series."})}),(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{className:"term",children:"Input:"}),(0,t.jsxs)("dd",{className:"parameter",children:["substring : ",(0,t.jsx)("em",{children:"string"})]}),(0,t.jsx)("dd",{className:"parameter-description",children:"String to search for."}),(0,t.jsx)("dt",{className:"term",children:"Returns:"}),(0,t.jsx)("dd",{children:"Returns a Series with a boolean value for each element expressing if each element contained the inputted substring."}),(0,t.jsx)("dt",{className:"term",children:"Return Type:"}),(0,t.jsx)("dd",{children:"Series"})]})]}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser = pets.get('Owner_Comment')\r\ncomment_ser\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"object","index":[0,1,2,3,4,5,6,7],"data":[" There are no bad dogs, only bad owners.","My best birthday present ever!!!","****All you need is love and a cat.****","Love is a wet nose and a wagging tail.","Be the person your dog thinks you are.","No, thank you!","No, thank you!","No, thank you!"]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"comment_ser.str.contains('dog')\n"})}),"\n",(0,t.jsx)(a.A,{data:'{"name":"Owner_Comment","dtype":"bool","index":[0,1,2,3,4,5,6,7],"data":[true,false,false,false,true,false,false,false]}'})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],a=e.indexName||"Index",i=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:a}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:i[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],a="",i="";if(s)try{const e=JSON.parse(s);a=e.name||"",i=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(d){console.error("Error parsing data prop in SeriesComponent:",d)}const o=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",a,", dtype: ",i]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>o});var t=n(6540);const r={},a=t.createContext(r);function i(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9a1a2feb.a1bfeb61.js b/assets/js/9a1a2feb.a1bfeb61.js deleted file mode 100644 index 0675c7f2..00000000 --- a/assets/js/9a1a2feb.a1bfeb61.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[7338],{3649:e=>{e.exports=JSON.parse('{"tag":{"label":"docusaurus","permalink":"/bpd-reference/blog/tags/docusaurus","allTagsPath":"/bpd-reference/blog/tags","count":4,"unlisted":false},"listMetadata":{"permalink":"/bpd-reference/blog/tags/docusaurus","page":1,"postsPerPage":10,"totalPages":1,"totalCount":4,"blogDescription":"Blog","blogTitle":"Blog"}}')}}]); \ No newline at end of file diff --git a/assets/js/9a265863.cec8ad24.js b/assets/js/9a265863.cec8ad24.js deleted file mode 100644 index 95d954f9..00000000 --- a/assets/js/9a265863.cec8ad24.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1779],{2878:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var r=t(4848),i=t(8453);t(8597),t(5158);const a={sidebar_position:7,sidebar_label:"The Standard Normal Distribution",title:"The Standard Normal Distribution",tags:["normal distributions","standard units"]},s=void 0,d={id:"statistical-inference/standard_normal_distribution",title:"The Standard Normal Distribution",description:"Concept",source:"@site/docs/statistical-inference/standard_normal_distribution.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/standard_normal_distribution",permalink:"/bpd-reference/docs/statistical-inference/standard_normal_distribution",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/standard_normal_distribution.md",tags:[{label:"normal distributions",permalink:"/bpd-reference/docs/tags/normal-distributions"},{label:"standard units",permalink:"/bpd-reference/docs/tags/standard-units"}],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7,sidebar_label:"The Standard Normal Distribution",title:"The Standard Normal Distribution",tags:["normal distributions","standard units"]},sidebar:"statsSidebar",previous:{title:"Permutation Test",permalink:"/bpd-reference/docs/statistical-inference/permutation_test"},next:{title:"Standard Units, Correlation, Regression",permalink:"/bpd-reference/docs/statistical-inference/standard_units"}},o={},l=[{value:"Concept",id:"concept",level:2},{value:"Inflection Points Visualized",id:"inflection-points-visualized",level:4},{value:"Finding Areas Under the Standard Normal Curve",id:"finding-areas-under-the-standard-normal-curve",level:2},{value:"Find the area under the standard normal curve from -\u221e to z",id:"find-the-area-under-the-standard-normal-curve-from---to-z",level:4},{value:"Find the area under the standard normal curve from z_1 to z_2",id:"find-the-area-under-the-standard-normal-curve-from-z_1-to-z_2",level:4},{value:"Examples in Python:",id:"examples-in-python",level:3}];function c(e){const n={admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"concept",children:"Concept"}),"\n",(0,r.jsx)(n.admonition,{title:"Key Idea",type:"tip",children:(0,r.jsxs)(n.p,{children:["The standard normal distribution is a normal distribution with mean 0, standard deviation 1, and\r\ninflection points at \xb11. The shape of the the standard normal distribution is called the\r\n",(0,r.jsx)(n.strong,{children:"standard normal curve"})," or ",(0,r.jsx)(n.strong,{children:"bell curve"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Curve",src:t(4966).A+"",width:"835",height:"489"})}),"\n",(0,r.jsx)(n.p,{children:"This is what the standard normal distribution curve looks like. Don't worry about the formula\r\nat the top."}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The area under the standard normal curve is always equal to 1."}),"\n",(0,r.jsxs)(n.li,{children:["The area between any values ",(0,r.jsx)(n.em,{children:"a"})," and ",(0,r.jsx)(n.em,{children:"b"})," is the ",(0,r.jsx)(n.strong,{children:"proportion of values"})," between ",(0,r.jsx)(n.em,{children:"a"})," and ",(0,r.jsx)(n.em,{children:"b"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["The x-axis in a plot of the standard normal distribution is in ",(0,r.jsx)(n.strong,{children:"standard units"}),"."]}),"\n"]})}),"\n",(0,r.jsxs)(n.admonition,{title:"Terminology",type:"info",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Cumulative Density Function (CDF)"}),": a function that takes in a value ",(0,r.jsx)(n.em,{children:"z"})," and returns the proportion of values in the distribution that are less than or equal to ",(0,r.jsx)(n.em,{children:"z"}),"."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Also known as the ",(0,r.jsx)(n.strong,{children:"area under the curve"})," to the left of ",(0,r.jsx)(n.em,{children:"z"}),"."]}),"\n"]}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Inflection Point"}),': where a curve goes from "opening down" \ud83d\ude41 to "opening up" \ud83d\ude42.']}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The standard normal curve has inflections points at 1 and -1."}),"\n"]}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"68\u201395\u201399.7 rule"}),": states that 68% of the data under the standard normal distribution falls within 1 standard deviation above and below the mean,\r\n95% within 2 standard deviations, and 99.7% within 3 standard deviations."]})]}),"\n",(0,r.jsx)(n.h4,{id:"inflection-points-visualized",children:"Inflection Points Visualized"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Curve",src:t(9388).A+"",width:"835",height:"452"})}),"\n",(0,r.jsx)(n.p,{children:"As you can see, the inflection points on a bell curve occur at 1 and -1."}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"finding-areas-under-the-standard-normal-curve",children:"Finding Areas Under the Standard Normal Curve"}),"\n",(0,r.jsxs)(n.h4,{id:"find-the-area-under-the-standard-normal-curve-from---to-z",children:["Find the area under the standard normal curve from -\u221e to ",(0,r.jsx)(n.em,{children:"z"})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"scipy.stats.norm.cdf(z)"})}),"\n",(0,r.jsxs)(n.h4,{id:"find-the-area-under-the-standard-normal-curve-from-z_1-to-z_2",children:["Find the area under the standard normal curve from ",(0,r.jsx)(n.em,{children:"z_1"})," to ",(0,r.jsx)(n.em,{children:"z_2"})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"scipy.stats.norm.cdf(z_2) - scipy.stats.norm.cdf(z_1)"})}),"\n",(0,r.jsx)(n.h3,{id:"examples-in-python",children:"Examples in Python:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'>>> print("Area from -inf to -1:", scipy.stats.norm.cdf(-1))\r\nArea from -inf to -1: 0.15865525393145707\r\n\r\n/* This means that 15.865% of the data in a standard normal curve \r\nfalls to the left of 1 standard deviation below the mean. */\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'>>> print("Area from -inf to 0:", scipy.stats.norm.cdf(0))\r\nArea from -inf to 0: 0.5\r\n\r\n/* This means that 50% of the data in a standard normal curve \r\nfalls to the left of the mean. */\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'>>> print("Area from -1 to 1:", scipy.stats.norm.cdf(1) - scipy.stats.norm.cdf(-1))\r\nArea from -1 to 1: 0.6826894921370859\r\n\r\n/* This means that 68.27% of the data in a standard normal curve \r\nfalls between 1 standard deviation above and below the mean, as stated\r\nin the 68-95-99.7 rule. */\n'})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8597:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var r=t(4848);const i=e=>{let{data:n}=e,t=[],i=[],a="",s=[];if(n){const e=JSON.parse(n);t=e.columns||[],i=e.data||[],a=e.indexName||"Index",s=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}),t.map(((e,n)=>(0,r.jsx)("th",{children:e},n)))]})}),(0,r.jsx)("tbody",{children:i.map(((e,n)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:s[n]}),e.map(((e,n)=>{return(0,r.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},n);var t}))]},n)))})]})})}},5158:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(6540),i=t(4848);const a=function(e){let{src:n,sourceLink:t,width:a="100%",height:s="100%",paddingBottom:d="56.25%"}=e;const[o,l]=(0,r.useState)(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"relative",height:"0",paddingBottom:d,overflow:"hidden",maxWidth:"100%"},children:(0,i.jsx)("iframe",{src:n,style:{position:"absolute",top:0,left:0,width:a,height:s,frameBorder:"0",allowFullScreen:!0}},o)}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"20px 0"},children:(0,i.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"(Source)"})}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"10px 0"},children:(0,i.jsx)("button",{onClick:()=>{l((e=>e+1))},style:{backgroundColor:"#4CAF50",color:"white",padding:"10px 20px",border:"none",borderRadius:"5px",cursor:"pointer",outline:"none",fontSize:"16px",fontWeight:"bold",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",transition:"background-color 0.3s"},onMouseOver:e=>e.currentTarget.style.backgroundColor="#45a049",onMouseOut:e=>e.currentTarget.style.backgroundColor="#4CAF50",children:"Restart Diagram"})})]})}},4966:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/bell-curve-c4a482525c2e17750bb95647297d25f3.png"},9388:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/inflection-points-6b128ab39b34eba0a4180b9238445c5f.png"},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>d});var r=t(6540);const i={},a=r.createContext(i);function s(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(i):e.components||i:s(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9a265863.d5fe33af.js b/assets/js/9a265863.d5fe33af.js new file mode 100644 index 00000000..f75d254f --- /dev/null +++ b/assets/js/9a265863.d5fe33af.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1779],{2878:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var r=t(4848),i=t(8453);t(8597),t(5158);const a={sidebar_position:7,sidebar_label:"The Standard Normal Distribution",title:"The Standard Normal Distribution",tags:["normal distributions","standard units"]},s=void 0,d={id:"statistical-inference/standard_normal_distribution",title:"The Standard Normal Distribution",description:"Concept",source:"@site/docs/statistical-inference/standard_normal_distribution.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/standard_normal_distribution",permalink:"/bpd-reference/docs/statistical-inference/standard_normal_distribution",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/standard_normal_distribution.md",tags:[{label:"normal distributions",permalink:"/bpd-reference/docs/tags/normal-distributions"},{label:"standard units",permalink:"/bpd-reference/docs/tags/standard-units"}],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7,sidebar_label:"The Standard Normal Distribution",title:"The Standard Normal Distribution",tags:["normal distributions","standard units"]},sidebar:"statsSidebar",previous:{title:"Permutation Test",permalink:"/bpd-reference/docs/statistical-inference/permutation_test"},next:{title:"Standard Units, Correlation, Regression",permalink:"/bpd-reference/docs/statistical-inference/standard_units"}},o={},l=[{value:"Concept",id:"concept",level:2},{value:"Inflection Points Visualized",id:"inflection-points-visualized",level:4},{value:"Finding Areas Under the Standard Normal Curve",id:"finding-areas-under-the-standard-normal-curve",level:2},{value:"Find the area under the standard normal curve from -\u221e to z",id:"find-the-area-under-the-standard-normal-curve-from---to-z",level:4},{value:"Find the area under the standard normal curve from z_1 to z_2",id:"find-the-area-under-the-standard-normal-curve-from-z_1-to-z_2",level:4},{value:"Examples in Python:",id:"examples-in-python",level:3}];function c(e){const n={admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",hr:"hr",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"concept",children:"Concept"}),"\n",(0,r.jsx)(n.admonition,{title:"Key Idea",type:"tip",children:(0,r.jsxs)(n.p,{children:["The standard normal distribution is a normal distribution with mean 0, standard deviation 1, and\ninflection points at \xb11. The shape of the the standard normal distribution is called the\n",(0,r.jsx)(n.strong,{children:"standard normal curve"})," or ",(0,r.jsx)(n.strong,{children:"bell curve"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Curve",src:t(8831).A+"",width:"835",height:"489"})}),"\n",(0,r.jsx)(n.p,{children:"This is what the standard normal distribution curve looks like. Don't worry about the formula\nat the top."}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The area under the standard normal curve is always equal to 1."}),"\n",(0,r.jsxs)(n.li,{children:["The area between any values ",(0,r.jsx)(n.em,{children:"a"})," and ",(0,r.jsx)(n.em,{children:"b"})," is the ",(0,r.jsx)(n.strong,{children:"proportion of values"})," between ",(0,r.jsx)(n.em,{children:"a"})," and ",(0,r.jsx)(n.em,{children:"b"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["The x-axis in a plot of the standard normal distribution is in ",(0,r.jsx)(n.strong,{children:"standard units"}),"."]}),"\n"]})}),"\n",(0,r.jsxs)(n.admonition,{title:"Terminology",type:"info",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Cumulative Density Function (CDF)"}),": a function that takes in a value ",(0,r.jsx)(n.em,{children:"z"})," and returns the proportion of values in the distribution that are less than or equal to ",(0,r.jsx)(n.em,{children:"z"}),"."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Also known as the ",(0,r.jsx)(n.strong,{children:"area under the curve"})," to the left of ",(0,r.jsx)(n.em,{children:"z"}),"."]}),"\n"]}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Inflection Point"}),': where a curve goes from "opening down" \ud83d\ude41 to "opening up" \ud83d\ude42.']}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The standard normal curve has inflections points at 1 and -1."}),"\n"]}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"68\u201395\u201399.7 rule"}),": states that 68% of the data under the standard normal distribution falls within 1 standard deviation above and below the mean,\n95% within 2 standard deviations, and 99.7% within 3 standard deviations."]})]}),"\n",(0,r.jsx)(n.h4,{id:"inflection-points-visualized",children:"Inflection Points Visualized"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Curve",src:t(2155).A+"",width:"835",height:"452"})}),"\n",(0,r.jsx)(n.p,{children:"As you can see, the inflection points on a bell curve occur at 1 and -1."}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h2,{id:"finding-areas-under-the-standard-normal-curve",children:"Finding Areas Under the Standard Normal Curve"}),"\n",(0,r.jsxs)(n.h4,{id:"find-the-area-under-the-standard-normal-curve-from---to-z",children:["Find the area under the standard normal curve from -\u221e to ",(0,r.jsx)(n.em,{children:"z"})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"scipy.stats.norm.cdf(z)"})}),"\n",(0,r.jsxs)(n.h4,{id:"find-the-area-under-the-standard-normal-curve-from-z_1-to-z_2",children:["Find the area under the standard normal curve from ",(0,r.jsx)(n.em,{children:"z_1"})," to ",(0,r.jsx)(n.em,{children:"z_2"})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"scipy.stats.norm.cdf(z_2) - scipy.stats.norm.cdf(z_1)"})}),"\n",(0,r.jsx)(n.h3,{id:"examples-in-python",children:"Examples in Python:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'>>> print("Area from -inf to -1:", scipy.stats.norm.cdf(-1))\nArea from -inf to -1: 0.15865525393145707\n\n/* This means that 15.865% of the data in a standard normal curve \nfalls to the left of 1 standard deviation below the mean. */\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'>>> print("Area from -inf to 0:", scipy.stats.norm.cdf(0))\nArea from -inf to 0: 0.5\n\n/* This means that 50% of the data in a standard normal curve \nfalls to the left of the mean. */\n'})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'>>> print("Area from -1 to 1:", scipy.stats.norm.cdf(1) - scipy.stats.norm.cdf(-1))\nArea from -1 to 1: 0.6826894921370859\n\n/* This means that 68.27% of the data in a standard normal curve \nfalls between 1 standard deviation above and below the mean, as stated\nin the 68-95-99.7 rule. */\n'})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8597:(e,n,t)=>{t.d(n,{A:()=>i});t(6540);var r=t(4848);const i=e=>{let{data:n}=e,t=[],i=[],a="",s=[];if(n){const e=JSON.parse(n);t=e.columns||[],i=e.data||[],a=e.indexName||"Index",s=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}),t.map(((e,n)=>(0,r.jsx)("th",{children:e},n)))]})}),(0,r.jsx)("tbody",{children:i.map(((e,n)=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"index-value",children:s[n]}),e.map(((e,n)=>{return(0,r.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},n);var t}))]},n)))})]})})}},5158:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(6540),i=t(4848);const a=function(e){let{src:n,sourceLink:t,width:a="100%",height:s="100%",paddingBottom:d="56.25%"}=e;const[o,l]=(0,r.useState)(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"relative",height:"0",paddingBottom:d,overflow:"hidden",maxWidth:"100%"},children:(0,i.jsx)("iframe",{src:n,style:{position:"absolute",top:0,left:0,width:a,height:s,frameBorder:"0",allowFullScreen:!0}},o)}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"20px 0"},children:(0,i.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"(Source)"})}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"10px 0"},children:(0,i.jsx)("button",{onClick:()=>{l((e=>e+1))},style:{backgroundColor:"#4CAF50",color:"white",padding:"10px 20px",border:"none",borderRadius:"5px",cursor:"pointer",outline:"none",fontSize:"16px",fontWeight:"bold",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",transition:"background-color 0.3s"},onMouseOver:e=>e.currentTarget.style.backgroundColor="#45a049",onMouseOut:e=>e.currentTarget.style.backgroundColor="#4CAF50",children:"Restart Diagram"})})]})}},8831:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/bell-curve-c4a482525c2e17750bb95647297d25f3.png"},2155:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/inflection-points-6b128ab39b34eba0a4180b9238445c5f.png"},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>d});var r=t(6540);const i={},a=r.createContext(i);function s(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(i):e.components||i:s(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9ac7dbcc.29890201.js b/assets/js/9ac7dbcc.29890201.js deleted file mode 100644 index e468347f..00000000 --- a/assets/js/9ac7dbcc.29890201.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[719],{7574:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var t=n(4848),r=n(8453),i=(n(8597),n(8205));const a={sidebar_position:4},o=void 0,c={id:"documentation/series-methods/ser.sum()",title:"ser.sum()",description:"ser.sum()",source:"@site/docs/documentation/series-methods/ser.sum().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.sum()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.sum()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.sum().md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"ser.min()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.min()"},next:{title:"ser.mean()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.mean()"}},d={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.sum()"}),"\n",(0,t.jsx)("div",{className:"base",children:(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the sum of the values in the Series."})})}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\r\nweight_ser\n"})}),"\n",(0,t.jsx)(i.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser.sum()\n"})}),"\n",(0,t.jsx)(s.p,{children:"172.75"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],i=e.indexName||"Index",a=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:i}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:a[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a="";if(s)try{const e=JSON.parse(s);i=e.name||"",a=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",a]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>o});var t=n(6540);const r={},i=t.createContext(r);function a(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9ac7dbcc.77c0c128.js b/assets/js/9ac7dbcc.77c0c128.js new file mode 100644 index 00000000..232e9f24 --- /dev/null +++ b/assets/js/9ac7dbcc.77c0c128.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[719],{7574:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var t=n(4848),r=n(8453),i=(n(8597),n(8205));const a={sidebar_position:4},o=void 0,c={id:"documentation/series-methods/ser.sum()",title:"ser.sum()",description:"ser.sum()",source:"@site/docs/documentation/series-methods/ser.sum().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.sum()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.sum()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.sum().md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"ser.min()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.min()"},next:{title:"ser.mean()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.mean()"}},d={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.sum()"}),"\n",(0,t.jsx)("div",{className:"base",children:(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the sum of the values in the Series."})})}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\nweight_ser\n"})}),"\n",(0,t.jsx)(i.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser.sum()\n"})}),"\n",(0,t.jsx)(s.p,{children:"172.75"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],i=e.indexName||"Index",a=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:i}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:a[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a="";if(s)try{const e=JSON.parse(s);i=e.name||"",a=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:o.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",a]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>o});var t=n(6540);const r={},i=t.createContext(r);function a(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/aba21aa0.6cc8becd.js b/assets/js/9c6685b1.77d25a1f.js similarity index 66% rename from assets/js/aba21aa0.6cc8becd.js rename to assets/js/9c6685b1.77d25a1f.js index afe55a40..581f5270 100644 --- a/assets/js/aba21aa0.6cc8becd.js +++ b/assets/js/9c6685b1.77d25a1f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5742],{9474:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9933],{1966:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/9e1896f0.2e4217dc.js b/assets/js/9e1896f0.2e4217dc.js new file mode 100644 index 00000000..360e8759 --- /dev/null +++ b/assets/js/9e1896f0.2e4217dc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2441],{1841:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var s=t(4848),a=t(8453),r=t(8597);t(8205);const i={sidebar_position:5},d=void 0,o={id:"documentation/building-organizing/df.set_index()",title:"df.set_index()",description:"df.setindex(columnname)",source:"@site/docs/documentation/building-organizing/df.set_index().md",sourceDirName:"documentation/building-organizing",slug:"/documentation/building-organizing/df.set_index()",permalink:"/bpd-reference/docs/documentation/building-organizing/df.set_index()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/building-organizing/df.set_index().md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"df.drop()",permalink:"/bpd-reference/docs/documentation/building-organizing/df.drop()"},next:{title:"df.reset_index()",permalink:"/bpd-reference/docs/documentation/building-organizing/df.reset_index()"}},c={},l=[];function m(e){const n={code:"code",hr:"hr",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("code",{children:"df.set_index(column_name)"}),"\n",(0,s.jsxs)("div",{className:"base",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:"Moves a column to the index."})}),(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"term",children:"Input:"}),(0,s.jsxs)("dd",{className:"parameter",children:["column_name : ",(0,s.jsx)("em",{children:"string"})]}),(0,s.jsx)("dd",{className:"parameter-description",children:"column name to make as the index"}),(0,s.jsx)("dt",{className:"term",children:"Returns:"}),(0,s.jsx)("dd",{children:"df_with_idx - A new DataFrame with the column set as the index"}),(0,s.jsx)("dt",{className:"term",children:"Return Type:"}),(0,s.jsx)("dd",{children:"DataFrame"})]})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"pets = pets.set_index('ID')\npets\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":["dog_001","cat_001","cat_002","dog_002","dog_003","ham_001","ham_002","cat_003"],"data":[["dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["hamster","black",1.0,3.0,false,"No, thank you!"],["hamster","golden",0.25,0.2,false,"No, thank you!"],["cat","black",10.0,0.0,true,"No, thank you!"]]}'})]})}function u(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},8597:(e,n,t)=>{t.d(n,{A:()=>a});t(6540);var s=t(4848);const a=e=>{let{data:n}=e,t=[],a=[],r="",i=[];if(n){const e=JSON.parse(n);t=e.columns||[],a=e.data||[],r=e.indexName||"Index",i=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:r}),t.map(((e,n)=>(0,s.jsx)("th",{children:e},n)))]})}),(0,s.jsx)("tbody",{children:a.map(((e,n)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:i[n]}),e.map(((e,n)=>{return(0,s.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},n);var t}))]},n)))})]})})}},8205:(e,n,t)=>{t.d(n,{A:()=>a});t(6540);var s=t(4848);const a=e=>{let{data:n}=e,t=[],a=[],r="",i="";if(n)try{const e=JSON.parse(n);r=e.name||"",i=e.dtype||"Unknown type",t=e.index||[],a=e.data||[]}catch(o){console.error("Error parsing data prop in SeriesComponent:",o)}const d=a.map((e=>JSON.stringify(e)));return(0,s.jsxs)("div",{className:"series-container",children:[(0,s.jsx)("ul",{className:"series-list",children:d.map(((e,n)=>(0,s.jsxs)("li",{className:"series-item",children:[(0,s.jsx)("span",{className:"series-index",children:t[n]}),(0,s.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,s.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",i]})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>d});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.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(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e1896f0.552059c3.js b/assets/js/9e1896f0.552059c3.js deleted file mode 100644 index 5ec0a367..00000000 --- a/assets/js/9e1896f0.552059c3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2441],{1841:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var s=t(4848),a=t(8453),r=t(8597);t(8205);const i={sidebar_position:5},d=void 0,o={id:"documentation/building-organizing/df.set_index()",title:"df.set_index()",description:"df.setindex(columnname)",source:"@site/docs/documentation/building-organizing/df.set_index().md",sourceDirName:"documentation/building-organizing",slug:"/documentation/building-organizing/df.set_index()",permalink:"/bpd-reference/docs/documentation/building-organizing/df.set_index()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/building-organizing/df.set_index().md",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"df.drop()",permalink:"/bpd-reference/docs/documentation/building-organizing/df.drop()"},next:{title:"df.reset_index()",permalink:"/bpd-reference/docs/documentation/building-organizing/df.reset_index()"}},c={},l=[];function m(e){const n={code:"code",hr:"hr",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("code",{children:"df.set_index(column_name)"}),"\n",(0,s.jsxs)("div",{className:"base",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:"Moves a column to the index."})}),(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"term",children:"Input:"}),(0,s.jsxs)("dd",{className:"parameter",children:["column_name : ",(0,s.jsx)("em",{children:"string"})]}),(0,s.jsx)("dd",{className:"parameter-description",children:"column name to make as the index"}),(0,s.jsx)("dt",{className:"term",children:"Returns:"}),(0,s.jsx)("dd",{children:"df_with_idx - A new DataFrame with the column set as the index"}),(0,s.jsx)("dt",{className:"term",children:"Return Type:"}),(0,s.jsx)("dd",{children:"DataFrame"})]})]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"pets = pets.set_index('ID')\r\npets\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":["dog_001","cat_001","cat_002","dog_002","dog_003","ham_001","ham_002","cat_003"],"data":[["dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["hamster","black",1.0,3.0,false,"No, thank you!"],["hamster","golden",0.25,0.2,false,"No, thank you!"],["cat","black",10.0,0.0,true,"No, thank you!"]]}'})]})}function u(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},8597:(e,n,t)=>{t.d(n,{A:()=>a});t(6540);var s=t(4848);const a=e=>{let{data:n}=e,t=[],a=[],r="",i=[];if(n){const e=JSON.parse(n);t=e.columns||[],a=e.data||[],r=e.indexName||"Index",i=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:r}),t.map(((e,n)=>(0,s.jsx)("th",{children:e},n)))]})}),(0,s.jsx)("tbody",{children:a.map(((e,n)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:i[n]}),e.map(((e,n)=>{return(0,s.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},n);var t}))]},n)))})]})})}},8205:(e,n,t)=>{t.d(n,{A:()=>a});t(6540);var s=t(4848);const a=e=>{let{data:n}=e,t=[],a=[],r="",i="";if(n)try{const e=JSON.parse(n);r=e.name||"",i=e.dtype||"Unknown type",t=e.index||[],a=e.data||[]}catch(o){console.error("Error parsing data prop in SeriesComponent:",o)}const d=a.map((e=>JSON.stringify(e)));return(0,s.jsxs)("div",{className:"series-container",children:[(0,s.jsx)("ul",{className:"series-list",children:d.map(((e,n)=>(0,s.jsxs)("li",{className:"series-item",children:[(0,s.jsx)("span",{className:"series-index",children:t[n]}),(0,s.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},n)))}),(0,s.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",i]})]})}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>d});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.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(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9e4087bc.1233637c.js b/assets/js/9e4087bc.8dd0f02f.js similarity index 96% rename from assets/js/9e4087bc.1233637c.js rename to assets/js/9e4087bc.8dd0f02f.js index b40ab82a..35101267 100644 --- a/assets/js/9e4087bc.1233637c.js +++ b/assets/js/9e4087bc.8dd0f02f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2711],{9331:(e,r,t)=>{t.r(r),t.d(r,{default:()=>m});t(6540);var a=t(8774),n=t(1312),s=t(5500),i=t(6266),c=t(4561),l=t(1107),o=t(4848);function d(e){let{year:r,posts:t}=e;const n=(0,i.i)({day:"numeric",month:"long",timeZone:"UTC"});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.A,{as:"h3",id:r,children:r}),(0,o.jsx)("ul",{children:t.map((e=>{return(0,o.jsx)("li",{children:(0,o.jsxs)(a.A,{to:e.metadata.permalink,children:[(r=e.metadata.date,n.format(new Date(r)))," - ",e.metadata.title]})},e.metadata.date);var r}))})]})}function h(e){let{years:r}=e;return(0,o.jsx)("section",{className:"margin-vert--lg",children:(0,o.jsx)("div",{className:"container",children:(0,o.jsx)("div",{className:"row",children:r.map(((e,r)=>(0,o.jsx)("div",{className:"col col--4 margin-vert--lg",children:(0,o.jsx)(d,{...e})},r)))})})})}function m(e){let{archive:r}=e;const t=(0,n.T)({id:"theme.blog.archive.title",message:"Archive",description:"The page & hero title of the blog archive page"}),a=(0,n.T)({id:"theme.blog.archive.description",message:"Archive",description:"The page & hero description of the blog archive page"}),i=function(e){const r=e.reduce(((e,r)=>{const t=r.metadata.date.split("-")[0],a=e.get(t)??[];return e.set(t,[r,...a])}),new Map);return Array.from(r,(e=>{let[r,t]=e;return{year:r,posts:t}}))}(r.blogPosts);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.be,{title:t,description:a}),(0,o.jsxs)(c.A,{children:[(0,o.jsx)("header",{className:"hero hero--primary",children:(0,o.jsxs)("div",{className:"container",children:[(0,o.jsx)(l.A,{as:"h1",className:"hero__title",children:t}),(0,o.jsx)("p",{className:"hero__subtitle",children:a})]})}),(0,o.jsx)("main",{children:i.length>0&&(0,o.jsx)(h,{years:i})})]})]})}},6266:(e,r,t)=>{t.d(r,{i:()=>n});var a=t(4586);function n(e){void 0===e&&(e={});const{i18n:{currentLocale:r}}=(0,a.A)(),t=function(){const{i18n:{currentLocale:e,localeConfigs:r}}=(0,a.A)();return r[e].calendar}();return new Intl.DateTimeFormat(r,{calendar:t,...e})}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2711],{9331:(e,r,t)=>{t.r(r),t.d(r,{default:()=>m});t(6540);var a=t(8774),n=t(1312),s=t(5500),i=t(6266),c=t(3932),l=t(1107),o=t(4848);function d(e){let{year:r,posts:t}=e;const n=(0,i.i)({day:"numeric",month:"long",timeZone:"UTC"});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.A,{as:"h3",id:r,children:r}),(0,o.jsx)("ul",{children:t.map((e=>{return(0,o.jsx)("li",{children:(0,o.jsxs)(a.A,{to:e.metadata.permalink,children:[(r=e.metadata.date,n.format(new Date(r)))," - ",e.metadata.title]})},e.metadata.date);var r}))})]})}function h(e){let{years:r}=e;return(0,o.jsx)("section",{className:"margin-vert--lg",children:(0,o.jsx)("div",{className:"container",children:(0,o.jsx)("div",{className:"row",children:r.map(((e,r)=>(0,o.jsx)("div",{className:"col col--4 margin-vert--lg",children:(0,o.jsx)(d,{...e})},r)))})})})}function m(e){let{archive:r}=e;const t=(0,n.T)({id:"theme.blog.archive.title",message:"Archive",description:"The page & hero title of the blog archive page"}),a=(0,n.T)({id:"theme.blog.archive.description",message:"Archive",description:"The page & hero description of the blog archive page"}),i=function(e){const r=e.reduce(((e,r)=>{const t=r.metadata.date.split("-")[0],a=e.get(t)??[];return e.set(t,[r,...a])}),new Map);return Array.from(r,(e=>{let[r,t]=e;return{year:r,posts:t}}))}(r.blogPosts);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.be,{title:t,description:a}),(0,o.jsxs)(c.A,{children:[(0,o.jsx)("header",{className:"hero hero--primary",children:(0,o.jsxs)("div",{className:"container",children:[(0,o.jsx)(l.A,{as:"h1",className:"hero__title",children:t}),(0,o.jsx)("p",{className:"hero__subtitle",children:a})]})}),(0,o.jsx)("main",{children:i.length>0&&(0,o.jsx)(h,{years:i})})]})]})}},6266:(e,r,t)=>{t.d(r,{i:()=>n});var a=t(4586);function n(e){void 0===e&&(e={});const{i18n:{currentLocale:r}}=(0,a.A)(),t=function(){const{i18n:{currentLocale:e,localeConfigs:r}}=(0,a.A)();return r[e].calendar}();return new Intl.DateTimeFormat(r,{calendar:t,...e})}}}]); \ No newline at end of file diff --git a/assets/js/9e7aae35.af9e1878.js b/assets/js/9e7aae35.af9e1878.js new file mode 100644 index 00000000..0e1295a2 --- /dev/null +++ b/assets/js/9e7aae35.af9e1878.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1903],{5049:e=>{e.exports=JSON.parse('{"title":"Querying","description":"Create a new dataframe containing only rows satisfying a condition","slug":"/category/querying","permalink":"/bpd-reference/docs/category/querying","navigation":{"previous":{"title":"list()","permalink":"/bpd-reference/docs/documentation/data format conversion/list()"},"next":{"title":"df[]","permalink":"/bpd-reference/docs/documentation/querying/df[]"}}}')}}]); \ No newline at end of file diff --git a/assets/js/9f1843d8.dc05ccfa.js b/assets/js/9f1843d8.dc05ccfa.js deleted file mode 100644 index 3de0ab43..00000000 --- a/assets/js/9f1843d8.dc05ccfa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9894],{6171:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var s=n(4848),i=n(8453),a=n(8597),r=n(5158);const o={sidebar_position:7,sidebar_label:"Permutation Test",title:"Permutation Test",tags:["querying","functions","for-loop","histogram"]},l=void 0,c={id:"statistical-inference/permutation_test",title:"Permutation Test",description:"Concept",source:"@site/docs/statistical-inference/permutation_test.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/permutation_test",permalink:"/bpd-reference/docs/statistical-inference/permutation_test",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/permutation_test.md",tags:[{label:"querying",permalink:"/bpd-reference/docs/tags/querying"},{label:"functions",permalink:"/bpd-reference/docs/tags/functions"},{label:"for-loop",permalink:"/bpd-reference/docs/tags/for-loop"},{label:"histogram",permalink:"/bpd-reference/docs/tags/histogram"}],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7,sidebar_label:"Permutation Test",title:"Permutation Test",tags:["querying","functions","for-loop","histogram"]},sidebar:"statsSidebar",previous:{title:"Hypothesis Test",permalink:"/bpd-reference/docs/statistical-inference/hypothesis_test"},next:{title:"The Standard Normal Distribution",permalink:"/bpd-reference/docs/statistical-inference/standard_normal_distribution"}},d={},h=[{value:"Concept",id:"concept",level:2},{value:"Code Example",id:"code-example",level:2},{value:"1. State the question/hypothesis",id:"1-state-the-questionhypothesis",level:3},{value:"2. Query the DataFrame",id:"2-query-the-dataframe",level:3},{value:"3. Create a function to calculate test statistic",id:"3-create-a-function-to-calculate-test-statistic",level:3},{value:"4. Simulate the permutation test",id:"4-simulate-the-permutation-test",level:3},{value:"5. Conclusion",id:"5-conclusion",level:3},{value:"6. Extra",id:"6-extra",level:3}];function u(e){const t={a:"a",admonition:"admonition",annotation:"annotation",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",math:"math",mo:"mo",mrow:"mrow",ol:"ol",p:"p",pre:"pre",semantics:"semantics",span:"span",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"concept",children:"Concept"}),"\n",(0,s.jsx)(t.admonition,{title:"Key Idea",type:"tip",children:(0,s.jsx)(t.p,{children:"We use a permutation test to test whether two samples are drawn from the same population."})}),"\n",(0,s.jsxs)(t.admonition,{title:"Terminology",type:"info",children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Permutation"}),": A permutation of a sequence is a rearrangement of the elements in that sequence."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Example: 'BAC' and 'CAB' are both permutations of the string 'ABC'."}),"\n",(0,s.jsx)(t.li,{children:"We create permutations by shuffling."}),"\n"]}),(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Permutation tests:"})," A permutation test is a type of A/B test (and a type of hypothesis test). It tests whether two samples come from the same population distribution. To conduct a permutation test:"]}),(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Shuffle the group labels (i.e. the Trues and Falses) to generate two new samples under the null."}),"\n",(0,s.jsx)(t.li,{children:"Compute the test statistic (i.e. the difference in group means)."}),"\n",(0,s.jsx)(t.li,{children:"Repeat steps 1 and 2 to generate an empirical distribution of the test statistics (i.e. the difference in group means)."}),"\n",(0,s.jsx)(t.li,{children:"See where the observed statistic lies in the empirical distribution. If, in our simulations, we rarely saw a difference in group means as extreme as the observed difference in group means, we have evidence to reject the null."}),"\n"]})]}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsx)(t.p,{children:"While shuffling, the size of the two new samples should be the same as the observed samples."})}),"\n",(0,s.jsxs)(t.p,{children:["The diagram below provides an overview of conducting a permutation test, although it references a different dataset. ",(0,s.jsx)(t.a,{href:"https://www.jwilber.me/permutationtest/",children:"Here"})," is another useful visualization. For additional helpful visual guides, please visit the ",(0,s.jsx)(t.a,{href:"https://dsc10.com/diagrams/",children:"Diagrams"})," site."]}),"\n",(0,s.jsx)(r.A,{src:"https://docs.google.com/presentation/d/e/2PACX-1vSovXDonR6EmjrT45h4pY1mwmcKFMWVSdgpbKHC5HNTm9sbG7dojvvCDEQCjuk2dk1oA4gmwMogr8ZL/embed?start=true&loop=false&delayms=3000&rm=minimal",sourceLink:"https://docs.google.com/presentation/d/1TTWoQ7FU4tzBGc7EskF6WYccIn1BWQbTSizAiFc2p2o/edit?usp=sharing"}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h2,{id:"code-example",children:"Code Example"}),"\n",(0,s.jsx)(t.h3,{id:"1-state-the-questionhypothesis",children:"1. State the question/hypothesis"}),"\n",(0,s.jsxs)(t.admonition,{title:"Hypotheses",type:"info",children:[(0,s.jsx)(t.p,{children:"Our pair of hypotheses is:"}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Null Hypothesis:"})," The mean weights of dogs and cats are the ",(0,s.jsx)(t.em,{children:"same"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Alternative Hypothesis:"})," The mean weights of dogs and cats are ",(0,s.jsx)(t.em,{children:"different"}),"."]}),"\n"]})]}),"\n",(0,s.jsxs)(t.p,{children:['Since the alternative hypothesis is of the form "A and B are different," the ',(0,s.jsx)(t.strong,{children:"test statistic"})," should measure distance and use an absolute value."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsxs)(t.span,{className:"katex",children:[(0,s.jsx)(t.span,{className:"katex-mathml",children:(0,s.jsx)(t.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,s.jsxs)(t.semantics,{children:[(0,s.jsx)(t.mrow,{children:(0,s.jsx)(t.mo,{children:"\u2234"})}),(0,s.jsx)(t.annotation,{encoding:"application/x-tex",children:"\\therefore"})]})})}),(0,s.jsx)(t.span,{className:"katex-html","aria-hidden":"true",children:(0,s.jsxs)(t.span,{className:"base",children:[(0,s.jsx)(t.span,{className:"strut",style:{height:"0.6922em"}}),(0,s.jsx)(t.span,{className:"mrel amsrm",children:"\u2234"})]})})]})," Use ",(0,s.jsx)(t.strong,{children:"absolute difference in group means"})," as the test statistic."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"2-query-the-dataframe",children:"2. Query the DataFrame"}),"\n",(0,s.jsx)(t.p,{children:"Since we want to compare the distributions of only cats and dogs, we need to make sure to only include the relevant pieces of data (e.g., cats and dogs weights)."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"# Create a boolean Series that references which rows fulfill either condition.\r\nquerying_condition = (full_pets.get('Species') == 'dog') | (full_pets.get('Species') == 'cat')\r\n# Query.\r\ncats_dogs = full_pets[querying_condition]\r\n# Display the first 5 rows only.\r\ncats_dogs.take(np.arange(5)) \n"})}),"\n",(0,s.jsx)(a.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"3-create-a-function-to-calculate-test-statistic",children:"3. Create a function to calculate test statistic"}),"\n",(0,s.jsx)(t.p,{children:"Since our hypotheses depend on the test statistic, create a function to be able to calculate it during every trial of our permutation test."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def difference_in_means(cats_dogs):\r\n \"\"\"\r\n Calculate the absolute difference in the mean weight of dogs and cats.\r\n ---\r\n Input:\r\n cats_dogs: a DataFrame containing the columns 'Species' and 'Weight'.\r\n ---\r\n Output:\r\n The absolute difference in the mean weight of dogs and cats.\r\n \"\"\"\r\n means = cats_dogs.groupby('Species').mean()\r\n return np.abs((means.get('Weight').loc['dog'] - means.get('Weight').loc['cat']))\n"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.em,{children:"Note: Although we can simply do this in the for-loop shown in the next step, we can practice good coding habits by separating our code into readable bits!"})}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"4-simulate-the-permutation-test",children:"4. Simulate the permutation test"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"n = 500 # Number of simulations.\r\nstatistics = np.array([]) # Array to keep track of the difference in means for each iteration.\r\nfor i in np.arange(n): # Run the simulation `n` number of times\r\n # 1. Shuffle the species.\r\n shuffled = cats_dogs.assign(Species=np.random.permutation(cats_dogs.get('Species')))\r\n\r\n # 2. Compute the test statistic.\r\n statistic = difference_in_means(shuffled)\r\n\r\n # 3. Save the result.\r\n statistics = np.append(statistics, statistic)\n"})}),"\n",(0,s.jsxs)(t.p,{children:["This code will run the permutation test 500 times, but a different reasonable number can be used instead. It is ",(0,s.jsx)(t.strong,{children:"crucial"})," to keep track of the difference in means each time our for-loop runs so that the number of simulated values can be displayed."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"5-conclusion",children:"5. Conclusion"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:'observed = difference_in_means(cats_dogs)\r\np_value = np.count_nonzero(statistics >= observed) / n\r\n\r\nprint("The observed value of the test statistic is:", observed)\r\nprint("The p-value is:", p_value)\n'})}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"The observed value of the test statistic is: 30.361111111111107"})," ",(0,s.jsx)("br",{}),"\r\n",(0,s.jsx)(t.strong,{children:"The p-value is: 0.004"})]}),"\n",(0,s.jsx)(t.p,{children:"Using a significance level of 0.05:"}),"\n",(0,s.jsx)(t.admonition,{title:"Conclusion",type:"info",children:(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Under the null hypothesis, we rarely see a difference greater than the observed value."}),"\n",(0,s.jsxs)(t.li,{children:["Therefore, we ",(0,s.jsx)(t.strong,{children:"reject"})," the null hypothesis: the evidence implies that the two groups do not come from the same distribution."]}),"\n",(0,s.jsx)(t.li,{children:"Still, we cannot conclude that species causes a different weight because there may be other confounding variables."}),"\n"]})}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"6-extra",children:"6. Extra"}),"\n",(0,s.jsx)(t.p,{children:"Let's see how our observed statistic compares to the overall simulated values!"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"# Create the histogram.\r\nbpd.DataFrame().assign(statistics=statistics).plot(kind='hist', bins=20, density=True, ec='w')\r\n# Don't worry about this line - you won't need to know it for this course!\r\nplt.axvline(x=observed, c='black', linewidth=4, label='population difference in means')\n"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Distribution",src:n(6718).A+"",width:"576",height:"413"})}),"\n",(0,s.jsxs)(t.p,{children:["From this graph, we can tell that there is barely any data to the ",(0,s.jsx)(t.strong,{children:"right"})," of the black vertical line (our test statistic), meaning we have a very low p-value!"]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8597:(e,t,n)=>{n.d(t,{A:()=>i});n(6540);var s=n(4848);const i=e=>{let{data:t}=e,n=[],i=[],a="",r=[];if(t){const e=JSON.parse(t);n=e.columns||[],i=e.data||[],a=e.indexName||"Index",r=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:a}),n.map(((e,t)=>(0,s.jsx)("th",{children:e},t)))]})}),(0,s.jsx)("tbody",{children:i.map(((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:r[t]}),e.map(((e,t)=>{return(0,s.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},t);var n}))]},t)))})]})})}},5158:(e,t,n)=>{n.d(t,{A:()=>a});var s=n(6540),i=n(4848);const a=function(e){let{src:t,sourceLink:n,width:a="100%",height:r="100%",paddingBottom:o="56.25%"}=e;const[l,c]=(0,s.useState)(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"relative",height:"0",paddingBottom:o,overflow:"hidden",maxWidth:"100%"},children:(0,i.jsx)("iframe",{src:t,style:{position:"absolute",top:0,left:0,width:a,height:r,frameBorder:"0",allowFullScreen:!0}},l)}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"20px 0"},children:(0,i.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:"(Source)"})}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"10px 0"},children:(0,i.jsx)("button",{onClick:()=>{c((e=>e+1))},style:{backgroundColor:"#4CAF50",color:"white",padding:"10px 20px",border:"none",borderRadius:"5px",cursor:"pointer",outline:"none",fontSize:"16px",fontWeight:"bold",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",transition:"background-color 0.3s"},onMouseOver:e=>e.currentTarget.style.backgroundColor="#45a049",onMouseOut:e=>e.currentTarget.style.backgroundColor="#4CAF50",children:"Restart Diagram"})})]})}},6718:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/permutation-test-fae4df12733e667b05989b96bf08d9a9.png"},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>o});var s=n(6540);const i={},a=s.createContext(i);function r(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9f1843d8.dcaa7195.js b/assets/js/9f1843d8.dcaa7195.js new file mode 100644 index 00000000..3db6c40a --- /dev/null +++ b/assets/js/9f1843d8.dcaa7195.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[9894],{6171:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var s=n(4848),i=n(8453),a=n(8597),r=n(5158);const o={sidebar_position:7,sidebar_label:"Permutation Test",title:"Permutation Test",tags:["querying","functions","for-loop","histogram"]},l=void 0,c={id:"statistical-inference/permutation_test",title:"Permutation Test",description:"Concept",source:"@site/docs/statistical-inference/permutation_test.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/permutation_test",permalink:"/bpd-reference/docs/statistical-inference/permutation_test",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/permutation_test.md",tags:[{label:"querying",permalink:"/bpd-reference/docs/tags/querying"},{label:"functions",permalink:"/bpd-reference/docs/tags/functions"},{label:"for-loop",permalink:"/bpd-reference/docs/tags/for-loop"},{label:"histogram",permalink:"/bpd-reference/docs/tags/histogram"}],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7,sidebar_label:"Permutation Test",title:"Permutation Test",tags:["querying","functions","for-loop","histogram"]},sidebar:"statsSidebar",previous:{title:"Hypothesis Test",permalink:"/bpd-reference/docs/statistical-inference/hypothesis_test"},next:{title:"The Standard Normal Distribution",permalink:"/bpd-reference/docs/statistical-inference/standard_normal_distribution"}},d={},h=[{value:"Concept",id:"concept",level:2},{value:"Code Example",id:"code-example",level:2},{value:"1. State the question/hypothesis",id:"1-state-the-questionhypothesis",level:3},{value:"2. Query the DataFrame",id:"2-query-the-dataframe",level:3},{value:"3. Create a function to calculate test statistic",id:"3-create-a-function-to-calculate-test-statistic",level:3},{value:"4. Simulate the permutation test",id:"4-simulate-the-permutation-test",level:3},{value:"5. Conclusion",id:"5-conclusion",level:3},{value:"6. Extra",id:"6-extra",level:3}];function u(e){const t={a:"a",admonition:"admonition",annotation:"annotation",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",math:"math",mo:"mo",mrow:"mrow",ol:"ol",p:"p",pre:"pre",semantics:"semantics",span:"span",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"concept",children:"Concept"}),"\n",(0,s.jsx)(t.admonition,{title:"Key Idea",type:"tip",children:(0,s.jsx)(t.p,{children:"We use a permutation test to test whether two samples are drawn from the same population."})}),"\n",(0,s.jsxs)(t.admonition,{title:"Terminology",type:"info",children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Permutation"}),": A permutation of a sequence is a rearrangement of the elements in that sequence."]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Example: 'BAC' and 'CAB' are both permutations of the string 'ABC'."}),"\n",(0,s.jsx)(t.li,{children:"We create permutations by shuffling."}),"\n"]}),(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Permutation tests:"})," A permutation test is a type of A/B test (and a type of hypothesis test). It tests whether two samples come from the same population distribution. To conduct a permutation test:"]}),(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Shuffle the group labels (i.e. the Trues and Falses) to generate two new samples under the null."}),"\n",(0,s.jsx)(t.li,{children:"Compute the test statistic (i.e. the difference in group means)."}),"\n",(0,s.jsx)(t.li,{children:"Repeat steps 1 and 2 to generate an empirical distribution of the test statistics (i.e. the difference in group means)."}),"\n",(0,s.jsx)(t.li,{children:"See where the observed statistic lies in the empirical distribution. If, in our simulations, we rarely saw a difference in group means as extreme as the observed difference in group means, we have evidence to reject the null."}),"\n"]})]}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsx)(t.p,{children:"While shuffling, the size of the two new samples should be the same as the observed samples."})}),"\n",(0,s.jsxs)(t.p,{children:["The diagram below provides an overview of conducting a permutation test, although it references a different dataset. ",(0,s.jsx)(t.a,{href:"https://www.jwilber.me/permutationtest/",children:"Here"})," is another useful visualization. For additional helpful visual guides, please visit the ",(0,s.jsx)(t.a,{href:"https://dsc10.com/diagrams/",children:"Diagrams"})," site."]}),"\n",(0,s.jsx)(r.A,{src:"https://docs.google.com/presentation/d/e/2PACX-1vSovXDonR6EmjrT45h4pY1mwmcKFMWVSdgpbKHC5HNTm9sbG7dojvvCDEQCjuk2dk1oA4gmwMogr8ZL/embed?start=true&loop=false&delayms=3000&rm=minimal",sourceLink:"https://docs.google.com/presentation/d/1TTWoQ7FU4tzBGc7EskF6WYccIn1BWQbTSizAiFc2p2o/edit?usp=sharing"}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h2,{id:"code-example",children:"Code Example"}),"\n",(0,s.jsx)(t.h3,{id:"1-state-the-questionhypothesis",children:"1. State the question/hypothesis"}),"\n",(0,s.jsxs)(t.admonition,{title:"Hypotheses",type:"info",children:[(0,s.jsx)(t.p,{children:"Our pair of hypotheses is:"}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Null Hypothesis:"})," The mean weights of dogs and cats are the ",(0,s.jsx)(t.em,{children:"same"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Alternative Hypothesis:"})," The mean weights of dogs and cats are ",(0,s.jsx)(t.em,{children:"different"}),"."]}),"\n"]})]}),"\n",(0,s.jsxs)(t.p,{children:['Since the alternative hypothesis is of the form "A and B are different," the ',(0,s.jsx)(t.strong,{children:"test statistic"})," should measure distance and use an absolute value."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsxs)(t.span,{className:"katex",children:[(0,s.jsx)(t.span,{className:"katex-mathml",children:(0,s.jsx)(t.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,s.jsxs)(t.semantics,{children:[(0,s.jsx)(t.mrow,{children:(0,s.jsx)(t.mo,{children:"\u2234"})}),(0,s.jsx)(t.annotation,{encoding:"application/x-tex",children:"\\therefore"})]})})}),(0,s.jsx)(t.span,{className:"katex-html","aria-hidden":"true",children:(0,s.jsxs)(t.span,{className:"base",children:[(0,s.jsx)(t.span,{className:"strut",style:{height:"0.6922em"}}),(0,s.jsx)(t.span,{className:"mrel amsrm",children:"\u2234"})]})})]})," Use ",(0,s.jsx)(t.strong,{children:"absolute difference in group means"})," as the test statistic."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"2-query-the-dataframe",children:"2. Query the DataFrame"}),"\n",(0,s.jsx)(t.p,{children:"Since we want to compare the distributions of only cats and dogs, we need to make sure to only include the relevant pieces of data (e.g., cats and dogs weights)."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"# Create a boolean Series that references which rows fulfill either condition.\nquerying_condition = (full_pets.get('Species') == 'dog') | (full_pets.get('Species') == 'cat')\n# Query.\ncats_dogs = full_pets[querying_condition]\n# Display the first 5 rows only.\ncats_dogs.take(np.arange(5)) \n"})}),"\n",(0,s.jsx)(a.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"3-create-a-function-to-calculate-test-statistic",children:"3. Create a function to calculate test statistic"}),"\n",(0,s.jsx)(t.p,{children:"Since our hypotheses depend on the test statistic, create a function to be able to calculate it during every trial of our permutation test."}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def difference_in_means(cats_dogs):\n \"\"\"\n Calculate the absolute difference in the mean weight of dogs and cats.\n ---\n Input:\n cats_dogs: a DataFrame containing the columns 'Species' and 'Weight'.\n ---\n Output:\n The absolute difference in the mean weight of dogs and cats.\n \"\"\"\n means = cats_dogs.groupby('Species').mean()\n return np.abs((means.get('Weight').loc['dog'] - means.get('Weight').loc['cat']))\n"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.em,{children:"Note: Although we can simply do this in the for-loop shown in the next step, we can practice good coding habits by separating our code into readable bits!"})}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"4-simulate-the-permutation-test",children:"4. Simulate the permutation test"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"n = 500 # Number of simulations.\nstatistics = np.array([]) # Array to keep track of the difference in means for each iteration.\nfor i in np.arange(n): # Run the simulation `n` number of times\n # 1. Shuffle the species.\n shuffled = cats_dogs.assign(Species=np.random.permutation(cats_dogs.get('Species')))\n\n # 2. Compute the test statistic.\n statistic = difference_in_means(shuffled)\n\n # 3. Save the result.\n statistics = np.append(statistics, statistic)\n"})}),"\n",(0,s.jsxs)(t.p,{children:["This code will run the permutation test 500 times, but a different reasonable number can be used instead. It is ",(0,s.jsx)(t.strong,{children:"crucial"})," to keep track of the difference in means each time our for-loop runs so that the number of simulated values can be displayed."]}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"5-conclusion",children:"5. Conclusion"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:'observed = difference_in_means(cats_dogs)\np_value = np.count_nonzero(statistics >= observed) / n\n\nprint("The observed value of the test statistic is:", observed)\nprint("The p-value is:", p_value)\n'})}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"The observed value of the test statistic is: 30.361111111111107"})," ",(0,s.jsx)("br",{}),"\n",(0,s.jsx)(t.strong,{children:"The p-value is: 0.004"})]}),"\n",(0,s.jsx)(t.p,{children:"Using a significance level of 0.05:"}),"\n",(0,s.jsx)(t.admonition,{title:"Conclusion",type:"info",children:(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Under the null hypothesis, we rarely see a difference greater than the observed value."}),"\n",(0,s.jsxs)(t.li,{children:["Therefore, we ",(0,s.jsx)(t.strong,{children:"reject"})," the null hypothesis: the evidence implies that the two groups do not come from the same distribution."]}),"\n",(0,s.jsx)(t.li,{children:"Still, we cannot conclude that species causes a different weight because there may be other confounding variables."}),"\n"]})}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.h3,{id:"6-extra",children:"6. Extra"}),"\n",(0,s.jsx)(t.p,{children:"Let's see how our observed statistic compares to the overall simulated values!"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"# Create the histogram.\nbpd.DataFrame().assign(statistics=statistics).plot(kind='hist', bins=20, density=True, ec='w')\n# Don't worry about this line - you won't need to know it for this course!\nplt.axvline(x=observed, c='black', linewidth=4, label='population difference in means')\n"})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Distribution",src:n(8803).A+"",width:"576",height:"413"})}),"\n",(0,s.jsxs)(t.p,{children:["From this graph, we can tell that there is barely any data to the ",(0,s.jsx)(t.strong,{children:"right"})," of the black vertical line (our test statistic), meaning we have a very low p-value!"]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8597:(e,t,n)=>{n.d(t,{A:()=>i});n(6540);var s=n(4848);const i=e=>{let{data:t}=e,n=[],i=[],a="",r=[];if(t){const e=JSON.parse(t);n=e.columns||[],i=e.data||[],a=e.indexName||"Index",r=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:a}),n.map(((e,t)=>(0,s.jsx)("th",{children:e},t)))]})}),(0,s.jsx)("tbody",{children:i.map(((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:r[t]}),e.map(((e,t)=>{return(0,s.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},t);var n}))]},t)))})]})})}},5158:(e,t,n)=>{n.d(t,{A:()=>a});var s=n(6540),i=n(4848);const a=function(e){let{src:t,sourceLink:n,width:a="100%",height:r="100%",paddingBottom:o="56.25%"}=e;const[l,c]=(0,s.useState)(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"relative",height:"0",paddingBottom:o,overflow:"hidden",maxWidth:"100%"},children:(0,i.jsx)("iframe",{src:t,style:{position:"absolute",top:0,left:0,width:a,height:r,frameBorder:"0",allowFullScreen:!0}},l)}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"20px 0"},children:(0,i.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:"(Source)"})}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center",margin:"10px 0"},children:(0,i.jsx)("button",{onClick:()=>{c((e=>e+1))},style:{backgroundColor:"#4CAF50",color:"white",padding:"10px 20px",border:"none",borderRadius:"5px",cursor:"pointer",outline:"none",fontSize:"16px",fontWeight:"bold",boxShadow:"0 4px 8px rgba(0,0,0,0.1)",transition:"background-color 0.3s"},onMouseOver:e=>e.currentTarget.style.backgroundColor="#45a049",onMouseOut:e=>e.currentTarget.style.backgroundColor="#4CAF50",children:"Restart Diagram"})})]})}},8803:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/permutation-test-fae4df12733e667b05989b96bf08d9a9.png"},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>o});var s=n(6540);const i={},a=s.createContext(i);function r(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a16987a3.423d1bcd.js b/assets/js/a16987a3.423d1bcd.js new file mode 100644 index 00000000..329c690b --- /dev/null +++ b/assets/js/a16987a3.423d1bcd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[7889],{4725:e=>{e.exports=JSON.parse('{"label":"normal distributions","permalink":"/bpd-reference/docs/tags/normal-distributions","allTagsPath":"/bpd-reference/docs/tags","count":1,"items":[{"id":"statistical-inference/standard_normal_distribution","title":"The Standard Normal Distribution","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/standard_normal_distribution"}],"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/a278cdf6.f2e85f73.js b/assets/js/a278cdf6.6d5ef8b3.js similarity index 59% rename from assets/js/a278cdf6.f2e85f73.js rename to assets/js/a278cdf6.6d5ef8b3.js index daf4e47c..a80dd4e0 100644 --- a/assets/js/a278cdf6.f2e85f73.js +++ b/assets/js/a278cdf6.6d5ef8b3.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1746],{8242:(e,a,t)=>{t.r(a),t.d(a,{Tag:()=>l,assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var n=t(4848),s=t(8453),r=t(8597);const o={sidebar_position:1,sidebar_label:"Intro"},i="Statistical Inference",c={id:"statistical-inference/intro",title:"intro",description:"Assumption: Assume that df is a DataFrame, ser is a Series, arr is an array, and we already run import babypandas as bpd and import numpy as np.",source:"@site/docs/statistical-inference/intro.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/intro",permalink:"/bpd-reference/docs/statistical-inference/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,sidebar_label:"Intro"},sidebar:"statsSidebar",next:{title:"Sampling",permalink:"/bpd-reference/docs/statistical-inference/random sampling/sampling"}},d={},l=({children:e,color:a})=>{const t={span:"span",...(0,s.R)()};return(0,n.jsx)(t.span,{style:{backgroundColor:a,borderRadius:"4px",color:"#fff",padding:"0.2rem 0.5rem",fontWeight:"bold"},children:e})},h=[];function p(e){const a={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.h1,{id:"statistical-inference",children:"Statistical Inference"}),"\n",(0,n.jsxs)(a.p,{children:[(0,n.jsx)(l,{color:"#FF5733",children:"Assumption:"})," Assume that ",(0,n.jsx)(a.code,{children:"df"})," is a DataFrame, ",(0,n.jsx)(a.code,{children:"ser"})," is a Series, ",(0,n.jsx)(a.code,{children:"arr"})," is an array, and we already run ",(0,n.jsx)(a.code,{children:"import babypandas as bpd"})," and ",(0,n.jsx)(a.code,{children:"import numpy as np"}),"."]}),"\n",(0,n.jsx)(a.hr,{}),"\n",(0,n.jsxs)(a.p,{children:["This section provides explanations and code implementations of theories covered in ",(0,n.jsx)(a.a,{href:"https://dsc10.com",children:(0,n.jsx)(a.strong,{children:"DSC 10"})}),". For examples in this section, refer to the ",(0,n.jsx)(a.code,{children:"full_pets"})," DataFrame, which has more data than ",(0,n.jsx)(a.code,{children:"pets"})," DataFrame (which is used in the Documentation section)."]}),"\n",(0,n.jsx)(a.pre,{children:(0,n.jsx)(a.code,{className:"language-python",children:"full_pets\n"})}),"\n",(0,n.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"],["dog_004","dog","black",45.0,6.7,false,"No, thank you!"],["dog_005","dog","white",10.0,7.0,false,"No, thank you!"],["dog_006","dog","golden",35.0,4.0,false,"No, thank you!"],["cat_004","cat","black",10.0,1.2,true,"No, thank you!"],["cat_005","cat","white",15.0,2.5,true,"No, thank you!"],["ham_003","hamster","black",0.5,0.1,false,"No, thank you!"],["dog_007","dog","white",50.0,6.1,false,"No, thank you!"],["ham_004","hamster","golden",0.25,0.2,false,"No, thank you!"],["dog_008","dog","black",40.0,5.0,false,"No, thank you!"],["dog_009","dog","white",30.0,4.8,false,"No, thank you!"],["cat_006","cat","black",3.0,0.5,true,"No, thank you!"]]}'}),"\n",(0,n.jsx)(a.p,{children:(0,n.jsx)(a.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(7093).A+"",children:"Download this data"})})]})}function u(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},8597:(e,a,t)=>{t.d(a,{A:()=>s});t(6540);var n=t(4848);const s=e=>{let{data:a}=e,t=[],s=[],r="",o=[];if(a){const e=JSON.parse(a);t=e.columns||[],s=e.data||[],r=e.indexName||"Index",o=e.index||[]}return(0,n.jsx)("div",{className:"dataframe-container",children:(0,n.jsxs)("table",{className:"dataframe-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:r}),t.map(((e,a)=>(0,n.jsx)("th",{children:e},a)))]})}),(0,n.jsx)("tbody",{children:s.map(((e,a)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"index-value",children:o[a]}),e.map(((e,a)=>{return(0,n.jsx)("td",{children:(t=e,"boolean"==typeof t?t.toString().charAt(0).toUpperCase()+t.toString().slice(1):t)},a);var t}))]},a)))})]})})}},7093:(e,a,t)=>{t.d(a,{A:()=>n});const n=t.p+"assets/files/full_pets-517ccf7b024b3bc88dca09fa66ea6f10.csv"},8453:(e,a,t)=>{t.d(a,{R:()=>o,x:()=>i});var n=t(6540);const s={},r=n.createContext(s);function o(e){const a=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1746],{8242:(e,t,a)=>{a.r(t),a.d(t,{Tag:()=>l,assets:()=>d,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var n=a(4848),s=a(8453),r=a(8597);const o={sidebar_position:1,sidebar_label:"Intro"},i="Statistical Inference",c={id:"statistical-inference/intro",title:"intro",description:"Assumption: Assume that df is a DataFrame, ser is a Series, arr is an array, and we already run import babypandas as bpd and import numpy as np.",source:"@site/docs/statistical-inference/intro.md",sourceDirName:"statistical-inference",slug:"/statistical-inference/intro",permalink:"/bpd-reference/docs/statistical-inference/intro",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/statistical-inference/intro.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,sidebar_label:"Intro"},sidebar:"statsSidebar",next:{title:"Sampling",permalink:"/bpd-reference/docs/statistical-inference/random sampling/sampling"}},d={},l=({children:e,color:t})=>{const a={span:"span",...(0,s.R)()};return(0,n.jsx)(a.span,{style:{backgroundColor:t,borderRadius:"4px",color:"#fff",padding:"0.2rem 0.5rem",fontWeight:"bold"},children:e})},h=[];function p(e){const t={a:"a",code:"code",h1:"h1",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"statistical-inference",children:"Statistical Inference"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(l,{color:"#FF5733",children:"Assumption:"})," Assume that ",(0,n.jsx)(t.code,{children:"df"})," is a DataFrame, ",(0,n.jsx)(t.code,{children:"ser"})," is a Series, ",(0,n.jsx)(t.code,{children:"arr"})," is an array, and we already run ",(0,n.jsx)(t.code,{children:"import babypandas as bpd"})," and ",(0,n.jsx)(t.code,{children:"import numpy as np"}),"."]}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["This section provides explanations and code implementations of theories covered in ",(0,n.jsx)(t.a,{href:"https://dsc10.com",children:(0,n.jsx)(t.strong,{children:"DSC 10"})}),". For examples in this section, refer to the ",(0,n.jsx)(t.code,{children:"full_pets"})," DataFrame, which has more data than ",(0,n.jsx)(t.code,{children:"pets"})," DataFrame (which is used in the Documentation section)."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:"full_pets\n"})}),"\n",(0,n.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"],["dog_004","dog","black",45.0,6.7,false,"No, thank you!"],["dog_005","dog","white",10.0,7.0,false,"No, thank you!"],["dog_006","dog","golden",35.0,4.0,false,"No, thank you!"],["cat_004","cat","black",10.0,1.2,true,"No, thank you!"],["cat_005","cat","white",15.0,2.5,true,"No, thank you!"],["ham_003","hamster","black",0.5,0.1,false,"No, thank you!"],["dog_007","dog","white",50.0,6.1,false,"No, thank you!"],["ham_004","hamster","golden",0.25,0.2,false,"No, thank you!"],["dog_008","dog","black",40.0,5.0,false,"No, thank you!"],["dog_009","dog","white",30.0,4.8,false,"No, thank you!"],["cat_006","cat","black",3.0,0.5,true,"No, thank you!"]]}'}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:a(7093).A+"",children:"Download this data"})})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},8597:(e,t,a)=>{a.d(t,{A:()=>s});a(6540);var n=a(4848);const s=e=>{let{data:t}=e,a=[],s=[],r="",o=[];if(t){const e=JSON.parse(t);a=e.columns||[],s=e.data||[],r=e.indexName||"Index",o=e.index||[]}return(0,n.jsx)("div",{className:"dataframe-container",children:(0,n.jsxs)("table",{className:"dataframe-table",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:r}),a.map(((e,t)=>(0,n.jsx)("th",{children:e},t)))]})}),(0,n.jsx)("tbody",{children:s.map(((e,t)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"index-value",children:o[t]}),e.map(((e,t)=>{return(0,n.jsx)("td",{children:(a=e,"boolean"==typeof a?a.toString().charAt(0).toUpperCase()+a.toString().slice(1):a)},t);var a}))]},t)))})]})})}},7093:(e,t,a)=>{a.d(t,{A:()=>n});const n=a.p+"assets/files/full_pets-bd4f41996253fb2dfaf6757c68a3446f.csv"},8453:(e,t,a)=>{a.d(t,{R:()=>o,x:()=>i});var n=a(6540);const s={},r=n.createContext(s);function o(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a4805c9a.53481746.js b/assets/js/a4805c9a.53481746.js new file mode 100644 index 00000000..3d813f19 --- /dev/null +++ b/assets/js/a4805c9a.53481746.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[7174],{1617:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>i,contentTitle:()=>o,default:()=>m,frontMatter:()=>d,metadata:()=>c,toc:()=>l});var s=n(4848),t=n(8453),r=n(8597);n(8205);const d={sidebar_position:7},o=void 0,c={id:"documentation/accessing-data/df.take()",title:"df.take()",description:"df.take(indices)",source:"@site/docs/documentation/accessing-data/df.take().md",sourceDirName:"documentation/accessing-data",slug:"/documentation/accessing-data/df.take()",permalink:"/bpd-reference/docs/documentation/accessing-data/df.take()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/accessing-data/df.take().md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"docsSidebar",previous:{title:"df.columns",permalink:"/bpd-reference/docs/documentation/accessing-data/df.columns"},next:{title:"Series Methods",permalink:"/bpd-reference/docs/documentation/series-methods/"}},i={},l=[];function h(e){const a={code:"code",hr:"hr",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("code",{children:"df.take(indices)"}),"\n",(0,s.jsxs)("div",{className:"base",children:[(0,s.jsx)("p",{children:(0,s.jsxs)("strong",{children:["Return the elements in the given ",(0,s.jsx)("em",{children:"positional"})," indices."]})}),(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"term",children:"Input:"}),(0,s.jsxs)("dd",{className:"parameter",children:["indices : ",(0,s.jsx)("em",{children:"array"})]}),(0,s.jsx)("dd",{className:"parameter-description",children:"An array of ints indicating which positions to take."}),(0,s.jsx)("dt",{className:"term",children:"Returns:"}),(0,s.jsx)("dd",{children:"df - DataFrame with only the indices specified."}),(0,s.jsx)("dt",{className:"term",children:"Return Type:"}),(0,s.jsx)("dd",{children:"DataFrame"})]})]}),"\n",(0,s.jsx)(a.hr,{}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-python",children:"pets\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-python",children:"# take the top 5 rows of the DataFrame. (indices 0, 1, 2, 3, 4)\npets.take(np.arange(5))\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-python",children:"# 0, 2, 4 indices.\npets.take(np.arange(0, 6, 2))\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,2,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'})]})}function m(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8597:(e,a,n)=>{n.d(a,{A:()=>t});n(6540);var s=n(4848);const t=e=>{let{data:a}=e,n=[],t=[],r="",d=[];if(a){const e=JSON.parse(a);n=e.columns||[],t=e.data||[],r=e.indexName||"Index",d=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:r}),n.map(((e,a)=>(0,s.jsx)("th",{children:e},a)))]})}),(0,s.jsx)("tbody",{children:t.map(((e,a)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:d[a]}),e.map(((e,a)=>{return(0,s.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},a);var n}))]},a)))})]})})}},8205:(e,a,n)=>{n.d(a,{A:()=>t});n(6540);var s=n(4848);const t=e=>{let{data:a}=e,n=[],t=[],r="",d="";if(a)try{const e=JSON.parse(a);r=e.name||"",d=e.dtype||"Unknown type",n=e.index||[],t=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=t.map((e=>JSON.stringify(e)));return(0,s.jsxs)("div",{className:"series-container",children:[(0,s.jsx)("ul",{className:"series-list",children:o.map(((e,a)=>(0,s.jsxs)("li",{className:"series-item",children:[(0,s.jsx)("span",{className:"series-index",children:n[a]}),(0,s.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},a)))}),(0,s.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",d]})]})}},8453:(e,a,n)=>{n.d(a,{R:()=>d,x:()=>o});var s=n(6540);const t={},r=s.createContext(t);function d(e){const a=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),s.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a4805c9a.bf5ef1fd.js b/assets/js/a4805c9a.bf5ef1fd.js deleted file mode 100644 index abe4a687..00000000 --- a/assets/js/a4805c9a.bf5ef1fd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[7174],{1617:(e,a,n)=>{n.r(a),n.d(a,{assets:()=>i,contentTitle:()=>o,default:()=>m,frontMatter:()=>d,metadata:()=>c,toc:()=>l});var s=n(4848),t=n(8453),r=n(8597);n(8205);const d={sidebar_position:7},o=void 0,c={id:"documentation/accessing-data/df.take()",title:"df.take()",description:"df.take(indices)",source:"@site/docs/documentation/accessing-data/df.take().md",sourceDirName:"documentation/accessing-data",slug:"/documentation/accessing-data/df.take()",permalink:"/bpd-reference/docs/documentation/accessing-data/df.take()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/accessing-data/df.take().md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"docsSidebar",previous:{title:"df.columns",permalink:"/bpd-reference/docs/documentation/accessing-data/df.columns"},next:{title:"Series Methods",permalink:"/bpd-reference/docs/documentation/series-methods/"}},i={},l=[];function h(e){const a={code:"code",hr:"hr",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("code",{children:"df.take(indices)"}),"\n",(0,s.jsxs)("div",{className:"base",children:[(0,s.jsx)("p",{children:(0,s.jsxs)("strong",{children:["Return the elements in the given ",(0,s.jsx)("em",{children:"positional"})," indices."]})}),(0,s.jsxs)("dl",{children:[(0,s.jsx)("dt",{className:"term",children:"Input:"}),(0,s.jsxs)("dd",{className:"parameter",children:["indices : ",(0,s.jsx)("em",{children:"array"})]}),(0,s.jsx)("dd",{className:"parameter-description",children:"An array of ints indicating which positions to take."}),(0,s.jsx)("dt",{className:"term",children:"Returns:"}),(0,s.jsx)("dd",{children:"df - DataFrame with only the indices specified."}),(0,s.jsx)("dt",{className:"term",children:"Return Type:"}),(0,s.jsx)("dd",{children:"DataFrame"})]})]}),"\n",(0,s.jsx)(a.hr,{}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-python",children:"pets\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4,5,6,7],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."],["ham_001","hamster","black",1.0,3.0,false,"No, thank you!"],["ham_002","hamster","golden",0.25,0.2,false,"No, thank you!"],["cat_003","cat","black",10.0,0.0,true,"No, thank you!"]]}'}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-python",children:"# take the top 5 rows of the DataFrame. (indices 0, 1, 2, 3, 4)\r\npets.take(np.arange(5))\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,1,2,3,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_001","cat","golden",1.5,0.2,true,"My best birthday present ever!!!"],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_002","dog","white",80.0,2.0,false,"Love is a wet nose and a wagging tail."],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-python",children:"# 0, 2, 4 indices.\r\npets.take(np.arange(0, 6, 2))\n"})}),"\n",(0,s.jsx)(r.A,{data:'{"columns":["ID","Species","Color","Weight","Age","Is_Cat","Owner_Comment"],"index":[0,2,4],"data":[["dog_001","dog","black",40.0,5.0,false," There are no bad dogs, only bad owners."],["cat_002","cat","black",15.0,9.0,true,"****All you need is love and a cat.****"],["dog_003","dog","black",25.0,0.5,false,"Be the person your dog thinks you are."]]}'})]})}function m(e={}){const{wrapper:a}={...(0,t.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8597:(e,a,n)=>{n.d(a,{A:()=>t});n(6540);var s=n(4848);const t=e=>{let{data:a}=e,n=[],t=[],r="",d=[];if(a){const e=JSON.parse(a);n=e.columns||[],t=e.data||[],r=e.indexName||"Index",d=e.index||[]}return(0,s.jsx)("div",{className:"dataframe-container",children:(0,s.jsxs)("table",{className:"dataframe-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:r}),n.map(((e,a)=>(0,s.jsx)("th",{children:e},a)))]})}),(0,s.jsx)("tbody",{children:t.map(((e,a)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"index-value",children:d[a]}),e.map(((e,a)=>{return(0,s.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},a);var n}))]},a)))})]})})}},8205:(e,a,n)=>{n.d(a,{A:()=>t});n(6540);var s=n(4848);const t=e=>{let{data:a}=e,n=[],t=[],r="",d="";if(a)try{const e=JSON.parse(a);r=e.name||"",d=e.dtype||"Unknown type",n=e.index||[],t=e.data||[]}catch(c){console.error("Error parsing data prop in SeriesComponent:",c)}const o=t.map((e=>JSON.stringify(e)));return(0,s.jsxs)("div",{className:"series-container",children:[(0,s.jsx)("ul",{className:"series-list",children:o.map(((e,a)=>(0,s.jsxs)("li",{className:"series-item",children:[(0,s.jsx)("span",{className:"series-index",children:n[a]}),(0,s.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},a)))}),(0,s.jsxs)("div",{className:"series-footer",children:["Name: ",r,", dtype: ",d]})]})}},8453:(e,a,n)=>{n.d(a,{R:()=>d,x:()=>o});var s=n(6540);const t={},r=s.createContext(t);function d(e){const a=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function o(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:d(e.components),s.createElement(r.Provider,{value:a},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a934ee8a.ae97e89f.js b/assets/js/a934ee8a.ae97e89f.js new file mode 100644 index 00000000..9fd23c58 --- /dev/null +++ b/assets/js/a934ee8a.ae97e89f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5387],{5159:e=>{e.exports=JSON.parse('{"label":"standard units","permalink":"/bpd-reference/docs/tags/standard-units","allTagsPath":"/bpd-reference/docs/tags","count":1,"items":[{"id":"statistical-inference/standard_normal_distribution","title":"The Standard Normal Distribution","description":"Concept","permalink":"/bpd-reference/docs/statistical-inference/standard_normal_distribution"}],"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/abde3fc7.b4dcf340.js b/assets/js/abde3fc7.b4dcf340.js deleted file mode 100644 index 05ce6f60..00000000 --- a/assets/js/abde3fc7.b4dcf340.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[3490],{3001:e=>{e.exports=JSON.parse('{"tags":[{"label":"facebook","permalink":"/bpd-reference/blog/tags/facebook","count":1},{"label":"hello","permalink":"/bpd-reference/blog/tags/hello","count":2},{"label":"docusaurus","permalink":"/bpd-reference/blog/tags/docusaurus","count":4},{"label":"hola","permalink":"/bpd-reference/blog/tags/hola","count":1}]}')}}]); \ No newline at end of file diff --git a/assets/js/acb40918.20b35a67.js b/assets/js/acb40918.20b35a67.js new file mode 100644 index 00000000..7e6976db --- /dev/null +++ b/assets/js/acb40918.20b35a67.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2491],{1721:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var t=n(4848),r=n(8453),i=(n(8597),n(8205));const a={sidebar_position:6},d=void 0,o={id:"documentation/series-methods/ser.median()",title:"ser.median()",description:"ser.median()",source:"@site/docs/documentation/series-methods/ser.median().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.median()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.median()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.median().md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docsSidebar",previous:{title:"ser.mean()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.mean()"},next:{title:"ser.unique()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.unique()"}},c={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.median()"}),"\n",(0,t.jsx)("div",{className:"base",children:(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the median of the values in the Series."})})}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\nweight_ser\n"})}),"\n",(0,t.jsx)(i.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser.median()\n"})}),"\n",(0,t.jsx)(s.p,{children:"12.5"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],i=e.indexName||"Index",a=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:i}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:a[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a="";if(s)try{const e=JSON.parse(s);i=e.name||"",a=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(o){console.error("Error parsing data prop in SeriesComponent:",o)}const d=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:d.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",a]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>d});var t=n(6540);const r={},i=t.createContext(r);function a(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/acb40918.33fe453e.js b/assets/js/acb40918.33fe453e.js deleted file mode 100644 index 4911aa17..00000000 --- a/assets/js/acb40918.33fe453e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[2491],{1721:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var t=n(4848),r=n(8453),i=(n(8597),n(8205));const a={sidebar_position:6},d=void 0,o={id:"documentation/series-methods/ser.median()",title:"ser.median()",description:"ser.median()",source:"@site/docs/documentation/series-methods/ser.median().md",sourceDirName:"documentation/series-methods",slug:"/documentation/series-methods/ser.median()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.median()",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/series-methods/ser.median().md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docsSidebar",previous:{title:"ser.mean()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.mean()"},next:{title:"ser.unique()",permalink:"/bpd-reference/docs/documentation/series-methods/ser.unique()"}},c={},l=[];function m(e){const s={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("code",{children:"ser.median()"}),"\n",(0,t.jsx)("div",{className:"base",children:(0,t.jsx)("p",{children:(0,t.jsx)("strong",{children:"Returns the median of the values in the Series."})})}),"\n",(0,t.jsx)(s.hr,{}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser = pets.get('Weight')\r\nweight_ser\n"})}),"\n",(0,t.jsx)(i.A,{data:'{"name":"Weight","dtype":"float64", "index":[0,1,2,3,4,5,6,7],"data":[40.0,1.5,15.0,80.0,25.0,1.0,0.25,10.0]}'}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"weight_ser.median()\n"})}),"\n",(0,t.jsx)(s.p,{children:"12.5"})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(m,{...e})}):m(e)}},8597:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a=[];if(s){const e=JSON.parse(s);n=e.columns||[],r=e.data||[],i=e.indexName||"Index",a=e.index||[]}return(0,t.jsx)("div",{className:"dataframe-container",children:(0,t.jsxs)("table",{className:"dataframe-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:i}),n.map(((e,s)=>(0,t.jsx)("th",{children:e},s)))]})}),(0,t.jsx)("tbody",{children:r.map(((e,s)=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{className:"index-value",children:a[s]}),e.map(((e,s)=>{return(0,t.jsx)("td",{children:(n=e,"boolean"==typeof n?n.toString().charAt(0).toUpperCase()+n.toString().slice(1):n)},s);var n}))]},s)))})]})})}},8205:(e,s,n)=>{n.d(s,{A:()=>r});n(6540);var t=n(4848);const r=e=>{let{data:s}=e,n=[],r=[],i="",a="";if(s)try{const e=JSON.parse(s);i=e.name||"",a=e.dtype||"Unknown type",n=e.index||[],r=e.data||[]}catch(o){console.error("Error parsing data prop in SeriesComponent:",o)}const d=r.map((e=>JSON.stringify(e)));return(0,t.jsxs)("div",{className:"series-container",children:[(0,t.jsx)("ul",{className:"series-list",children:d.map(((e,s)=>(0,t.jsxs)("li",{className:"series-item",children:[(0,t.jsx)("span",{className:"series-index",children:n[s]}),(0,t.jsx)("span",{className:"series-value",children:"true"===e||"false"===e?e.charAt(0).toUpperCase()+e.slice(1):e})]},s)))}),(0,t.jsxs)("div",{className:"series-footer",children:["Name: ",i,", dtype: ",a]})]})}},8453:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>d});var t=n(6540);const r={},i=t.createContext(r);function a(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/acecf23e.978cac9e.js b/assets/js/acecf23e.6510b036.js similarity index 66% rename from assets/js/acecf23e.978cac9e.js rename to assets/js/acecf23e.6510b036.js index e80eea92..2d25a6f0 100644 --- a/assets/js/acecf23e.978cac9e.js +++ b/assets/js/acecf23e.6510b036.js @@ -1 +1 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1903],{1912:e=>{e.exports=JSON.parse('{"blogBasePath":"/bpd-reference/blog","blogTitle":"Blog"}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[4284],{1912:e=>{e.exports=JSON.parse('{"blogBasePath":"/bpd-reference/blog","blogTitle":"Blog"}')}}]); \ No newline at end of file diff --git a/assets/js/add9b02f.bf2acfd8.js b/assets/js/add9b02f.bf2acfd8.js new file mode 100644 index 00000000..02c666a8 --- /dev/null +++ b/assets/js/add9b02f.bf2acfd8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[5443],{7268:e=>{e.exports=JSON.parse('{"label":"docusaurus","permalink":"/bpd-reference/blog/tags/docusaurus","allTagsPath":"/bpd-reference/blog/tags","count":4,"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/b0c30e46.681267b4.js b/assets/js/b0c30e46.681267b4.js deleted file mode 100644 index 41eeb637..00000000 --- a/assets/js/b0c30e46.681267b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkbpd_reference=self.webpackChunkbpd_reference||[]).push([[1944],{3509:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var t=s(4848),r=s(8453),i=(s(8597),s(8205));const a={sidebar_position:2,description:"Checks for membership of object within a sequence."},c=void 0,o={id:"documentation/if-statements/in \u2044 not in",title:"in \u2044 not in",description:"Checks for membership of object within a sequence.",source:"@site/docs/documentation/if-statements/in \u2044 not in.md",sourceDirName:"documentation/if-statements",slug:"/documentation/if-statements/in \u2044 not in",permalink:"/bpd-reference/docs/documentation/if-statements/in \u2044 not in",draft:!1,unlisted:!1,editUrl:"https://github.com/dsc-courses/bpd-reference/tree/main/docs/documentation/if-statements/in \u2044 not in.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2,description:"Checks for membership of object within a sequence."},sidebar:"docsSidebar",previous:{title:"if-elif-else",permalink:"/bpd-reference/docs/documentation/if-statements/if-elif-else"},next:{title:"Logical Operators",permalink:"/bpd-reference/docs/documentation/if-statements/Logical Operators"}},d={},l=[];function m(e){const n={code:"code",hr:"hr",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsxs)("code",{children:["if