Skip to content

Instantly share code, notes, and snippets.

@sanchezcarlosjr
Last active October 7, 2022 23:52
Show Gist options
  • Save sanchezcarlosjr/10fbc3d4ec8e5118d4a2960c0e67f0e7 to your computer and use it in GitHub Desktop.
Save sanchezcarlosjr/10fbc3d4ec8e5118d4a2960c0e67f0e7 to your computer and use it in GitHub Desktop.
making-sense-of-data-graphics.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyMARH9x44RbN8YtkuZXnlOT",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/sanchezcarlosjr/10fbc3d4ec8e5118d4a2960c0e67f0e7/making-sense-of-data-graphics.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"id": "AtWK-tf4EaPP"
},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import matplotlib as plt"
]
},
{
"cell_type": "code",
"source": [
"from google.colab import files\n",
"files.upload()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 214
},
"id": "tay75K4MFZuK",
"outputId": "ce466512-decc-4aa0-bde2-b79e92b1e13e"
},
"execution_count": 16,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"<IPython.core.display.HTML object>"
],
"text/html": [
"\n",
" <input type=\"file\" id=\"files-cdbd8850-7d40-4769-b7c5-fe7802438156\" name=\"files[]\" multiple disabled\n",
" style=\"border:none\" />\n",
" <output id=\"result-cdbd8850-7d40-4769-b7c5-fe7802438156\">\n",
" Upload widget is only available when the cell has been executed in the\n",
" current browser session. Please rerun this cell to enable.\n",
" </output>\n",
" <script>// Copyright 2017 Google LLC\n",
"//\n",
"// Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"// you may not use this file except in compliance with the License.\n",
"// You may obtain a copy of the License at\n",
"//\n",
"// http://www.apache.org/licenses/LICENSE-2.0\n",
"//\n",
"// Unless required by applicable law or agreed to in writing, software\n",
"// distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"// See the License for the specific language governing permissions and\n",
"// limitations under the License.\n",
"\n",
"/**\n",
" * @fileoverview Helpers for google.colab Python module.\n",
" */\n",
"(function(scope) {\n",
"function span(text, styleAttributes = {}) {\n",
" const element = document.createElement('span');\n",
" element.textContent = text;\n",
" for (const key of Object.keys(styleAttributes)) {\n",
" element.style[key] = styleAttributes[key];\n",
" }\n",
" return element;\n",
"}\n",
"\n",
"// Max number of bytes which will be uploaded at a time.\n",
"const MAX_PAYLOAD_SIZE = 100 * 1024;\n",
"\n",
"function _uploadFiles(inputId, outputId) {\n",
" const steps = uploadFilesStep(inputId, outputId);\n",
" const outputElement = document.getElementById(outputId);\n",
" // Cache steps on the outputElement to make it available for the next call\n",
" // to uploadFilesContinue from Python.\n",
" outputElement.steps = steps;\n",
"\n",
" return _uploadFilesContinue(outputId);\n",
"}\n",
"\n",
"// This is roughly an async generator (not supported in the browser yet),\n",
"// where there are multiple asynchronous steps and the Python side is going\n",
"// to poll for completion of each step.\n",
"// This uses a Promise to block the python side on completion of each step,\n",
"// then passes the result of the previous step as the input to the next step.\n",
"function _uploadFilesContinue(outputId) {\n",
" const outputElement = document.getElementById(outputId);\n",
" const steps = outputElement.steps;\n",
"\n",
" const next = steps.next(outputElement.lastPromiseValue);\n",
" return Promise.resolve(next.value.promise).then((value) => {\n",
" // Cache the last promise value to make it available to the next\n",
" // step of the generator.\n",
" outputElement.lastPromiseValue = value;\n",
" return next.value.response;\n",
" });\n",
"}\n",
"\n",
"/**\n",
" * Generator function which is called between each async step of the upload\n",
" * process.\n",
" * @param {string} inputId Element ID of the input file picker element.\n",
" * @param {string} outputId Element ID of the output display.\n",
" * @return {!Iterable<!Object>} Iterable of next steps.\n",
" */\n",
"function* uploadFilesStep(inputId, outputId) {\n",
" const inputElement = document.getElementById(inputId);\n",
" inputElement.disabled = false;\n",
"\n",
" const outputElement = document.getElementById(outputId);\n",
" outputElement.innerHTML = '';\n",
"\n",
" const pickedPromise = new Promise((resolve) => {\n",
" inputElement.addEventListener('change', (e) => {\n",
" resolve(e.target.files);\n",
" });\n",
" });\n",
"\n",
" const cancel = document.createElement('button');\n",
" inputElement.parentElement.appendChild(cancel);\n",
" cancel.textContent = 'Cancel upload';\n",
" const cancelPromise = new Promise((resolve) => {\n",
" cancel.onclick = () => {\n",
" resolve(null);\n",
" };\n",
" });\n",
"\n",
" // Wait for the user to pick the files.\n",
" const files = yield {\n",
" promise: Promise.race([pickedPromise, cancelPromise]),\n",
" response: {\n",
" action: 'starting',\n",
" }\n",
" };\n",
"\n",
" cancel.remove();\n",
"\n",
" // Disable the input element since further picks are not allowed.\n",
" inputElement.disabled = true;\n",
"\n",
" if (!files) {\n",
" return {\n",
" response: {\n",
" action: 'complete',\n",
" }\n",
" };\n",
" }\n",
"\n",
" for (const file of files) {\n",
" const li = document.createElement('li');\n",
" li.append(span(file.name, {fontWeight: 'bold'}));\n",
" li.append(span(\n",
" `(${file.type || 'n/a'}) - ${file.size} bytes, ` +\n",
" `last modified: ${\n",
" file.lastModifiedDate ? file.lastModifiedDate.toLocaleDateString() :\n",
" 'n/a'} - `));\n",
" const percent = span('0% done');\n",
" li.appendChild(percent);\n",
"\n",
" outputElement.appendChild(li);\n",
"\n",
" const fileDataPromise = new Promise((resolve) => {\n",
" const reader = new FileReader();\n",
" reader.onload = (e) => {\n",
" resolve(e.target.result);\n",
" };\n",
" reader.readAsArrayBuffer(file);\n",
" });\n",
" // Wait for the data to be ready.\n",
" let fileData = yield {\n",
" promise: fileDataPromise,\n",
" response: {\n",
" action: 'continue',\n",
" }\n",
" };\n",
"\n",
" // Use a chunked sending to avoid message size limits. See b/62115660.\n",
" let position = 0;\n",
" do {\n",
" const length = Math.min(fileData.byteLength - position, MAX_PAYLOAD_SIZE);\n",
" const chunk = new Uint8Array(fileData, position, length);\n",
" position += length;\n",
"\n",
" const base64 = btoa(String.fromCharCode.apply(null, chunk));\n",
" yield {\n",
" response: {\n",
" action: 'append',\n",
" file: file.name,\n",
" data: base64,\n",
" },\n",
" };\n",
"\n",
" let percentDone = fileData.byteLength === 0 ?\n",
" 100 :\n",
" Math.round((position / fileData.byteLength) * 100);\n",
" percent.textContent = `${percentDone}% done`;\n",
"\n",
" } while (position < fileData.byteLength);\n",
" }\n",
"\n",
" // All done.\n",
" yield {\n",
" response: {\n",
" action: 'complete',\n",
" }\n",
" };\n",
"}\n",
"\n",
"scope.google = scope.google || {};\n",
"scope.google.colab = scope.google.colab || {};\n",
"scope.google.colab._files = {\n",
" _uploadFiles,\n",
" _uploadFilesContinue,\n",
"};\n",
"})(self);\n",
"</script> "
]
},
"metadata": {}
},
{
"output_type": "stream",
"name": "stdout",
"text": [
"Saving data_mining_making_sense.csv to data_mining_making_sense.csv\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"{'data_mining_making_sense.csv': b'Customer,Store,Product category,Product description,Sale price ($),Profit ($)\\r\\nJ. Smith,SD Mall,PS Game,Last of Us,49,5\\r\\nJ. Smith,L.A. Store,Online Game,Celeste,45,3\\r\\nJ. Smith,SD Mall,PS Game,Sniper Elite,35,4\\r\\nJ. Smith,SD Mall,NS Game,Zelda: BoW,45,5\\r\\nE. Robinson,SD Mall,PS Game,Last of Us,49,5\\r\\nE. Robinson,L.A. Store,PS Game,Speed 4,39,3\\r\\nF. Tyle,SD Mall,Online Game,Celeste,46,1\\r\\nK. Jonhs,SD Mall,Online Game,Limbo,15,1\\r\\nK. Jonhs,L.A. Store,Xbox Game,Overcooked 2,20,3\\r\\nK. Jonhs,L.A. Store,Xbox Game,Last of Us,40,5\\r\\nK. Jonhs,SD Mall,Online Game,Pool House,45,2\\r\\nK. Jonhs,L.A. Store,Xbox Game,Pokemon Sword,39,5\\r\\nK. Hike,SD Mall,Xbox Game,Pokemon Sword,39,5\\r\\nS.Lee,L.A. Store,NS Game,Pikmin 3,49,4\\r\\nP. Gales,L.A. Store,Online Game,Overcooked 2,20,3\\r\\nP. Gales,SD Mall,NS Game,Zelda: BoW,45,5\\r\\nY. Vert,SD Mall,Online Game,Pokemon Shield,39,5\\r\\nS. Kim,SD Mall,NS Game,Unravel two,20,2\\r\\nS. Kim,L.A. Store,Xbox Game,NFS Ultimate,56,4\\r\\nW. Wilson,SD Mall,Xbox Game,Overcooked 2,20,3\\r\\n'}"
]
},
"metadata": {},
"execution_count": 16
}
]
},
{
"cell_type": "code",
"source": [
"data = pd.read_csv(\"data_mining_making_sense.csv\")\n",
" \n",
"data"
],
"metadata": {
"id": "k9V0o3WsEuCz",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 677
},
"outputId": "6c7eee18-cf1b-4c21-eb0c-1539e0056862"
},
"execution_count": 31,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Customer Store Product category Product description \\\n",
"0 J. Smith SD Mall PS Game Last of Us \n",
"1 J. Smith L.A. Store Online Game Celeste \n",
"2 J. Smith SD Mall PS Game Sniper Elite \n",
"3 J. Smith SD Mall NS Game Zelda: BoW \n",
"4 E. Robinson SD Mall PS Game Last of Us \n",
"5 E. Robinson L.A. Store PS Game Speed 4 \n",
"6 F. Tyle SD Mall Online Game Celeste \n",
"7 K. Jonhs SD Mall Online Game Limbo \n",
"8 K. Jonhs L.A. Store Xbox Game Overcooked 2 \n",
"9 K. Jonhs L.A. Store Xbox Game Last of Us \n",
"10 K. Jonhs SD Mall Online Game Pool House \n",
"11 K. Jonhs L.A. Store Xbox Game Pokemon Sword \n",
"12 K. Hike SD Mall Xbox Game Pokemon Sword \n",
"13 S.Lee L.A. Store NS Game Pikmin 3 \n",
"14 P. Gales L.A. Store Online Game Overcooked 2 \n",
"15 P. Gales SD Mall NS Game Zelda: BoW \n",
"16 Y. Vert SD Mall Online Game Pokemon Shield \n",
"17 S. Kim SD Mall NS Game Unravel two \n",
"18 S. Kim L.A. Store Xbox Game NFS Ultimate \n",
"19 W. Wilson SD Mall Xbox Game Overcooked 2 \n",
"\n",
" Sale price ($) Profit ($) \n",
"0 49 5 \n",
"1 45 3 \n",
"2 35 4 \n",
"3 45 5 \n",
"4 49 5 \n",
"5 39 3 \n",
"6 46 1 \n",
"7 15 1 \n",
"8 20 3 \n",
"9 40 5 \n",
"10 45 2 \n",
"11 39 5 \n",
"12 39 5 \n",
"13 49 4 \n",
"14 20 3 \n",
"15 45 5 \n",
"16 39 5 \n",
"17 20 2 \n",
"18 56 4 \n",
"19 20 3 "
],
"text/html": [
"\n",
" <div id=\"df-f9caa9e8-b3a9-444d-8dd5-489df68f183f\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Customer</th>\n",
" <th>Store</th>\n",
" <th>Product category</th>\n",
" <th>Product description</th>\n",
" <th>Sale price ($)</th>\n",
" <th>Profit ($)</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>J. Smith</td>\n",
" <td>SD Mall</td>\n",
" <td>PS Game</td>\n",
" <td>Last of Us</td>\n",
" <td>49</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>J. Smith</td>\n",
" <td>L.A. Store</td>\n",
" <td>Online Game</td>\n",
" <td>Celeste</td>\n",
" <td>45</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>J. Smith</td>\n",
" <td>SD Mall</td>\n",
" <td>PS Game</td>\n",
" <td>Sniper Elite</td>\n",
" <td>35</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>J. Smith</td>\n",
" <td>SD Mall</td>\n",
" <td>NS Game</td>\n",
" <td>Zelda: BoW</td>\n",
" <td>45</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>E. Robinson</td>\n",
" <td>SD Mall</td>\n",
" <td>PS Game</td>\n",
" <td>Last of Us</td>\n",
" <td>49</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>E. Robinson</td>\n",
" <td>L.A. Store</td>\n",
" <td>PS Game</td>\n",
" <td>Speed 4</td>\n",
" <td>39</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>F. Tyle</td>\n",
" <td>SD Mall</td>\n",
" <td>Online Game</td>\n",
" <td>Celeste</td>\n",
" <td>46</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>K. Jonhs</td>\n",
" <td>SD Mall</td>\n",
" <td>Online Game</td>\n",
" <td>Limbo</td>\n",
" <td>15</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>K. Jonhs</td>\n",
" <td>L.A. Store</td>\n",
" <td>Xbox Game</td>\n",
" <td>Overcooked 2</td>\n",
" <td>20</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>K. Jonhs</td>\n",
" <td>L.A. Store</td>\n",
" <td>Xbox Game</td>\n",
" <td>Last of Us</td>\n",
" <td>40</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>K. Jonhs</td>\n",
" <td>SD Mall</td>\n",
" <td>Online Game</td>\n",
" <td>Pool House</td>\n",
" <td>45</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>K. Jonhs</td>\n",
" <td>L.A. Store</td>\n",
" <td>Xbox Game</td>\n",
" <td>Pokemon Sword</td>\n",
" <td>39</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>K. Hike</td>\n",
" <td>SD Mall</td>\n",
" <td>Xbox Game</td>\n",
" <td>Pokemon Sword</td>\n",
" <td>39</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>S.Lee</td>\n",
" <td>L.A. Store</td>\n",
" <td>NS Game</td>\n",
" <td>Pikmin 3</td>\n",
" <td>49</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>P. Gales</td>\n",
" <td>L.A. Store</td>\n",
" <td>Online Game</td>\n",
" <td>Overcooked 2</td>\n",
" <td>20</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>P. Gales</td>\n",
" <td>SD Mall</td>\n",
" <td>NS Game</td>\n",
" <td>Zelda: BoW</td>\n",
" <td>45</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>Y. Vert</td>\n",
" <td>SD Mall</td>\n",
" <td>Online Game</td>\n",
" <td>Pokemon Shield</td>\n",
" <td>39</td>\n",
" <td>5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>S. Kim</td>\n",
" <td>SD Mall</td>\n",
" <td>NS Game</td>\n",
" <td>Unravel two</td>\n",
" <td>20</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>S. Kim</td>\n",
" <td>L.A. Store</td>\n",
" <td>Xbox Game</td>\n",
" <td>NFS Ultimate</td>\n",
" <td>56</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>W. Wilson</td>\n",
" <td>SD Mall</td>\n",
" <td>Xbox Game</td>\n",
" <td>Overcooked 2</td>\n",
" <td>20</td>\n",
" <td>3</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-f9caa9e8-b3a9-444d-8dd5-489df68f183f')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-f9caa9e8-b3a9-444d-8dd5-489df68f183f button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-f9caa9e8-b3a9-444d-8dd5-489df68f183f');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 31
}
]
},
{
"cell_type": "code",
"source": [
"data.info()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "__6xr9v5GGwp",
"outputId": "80e56da7-c706-4b29-a4a6-e367d11d0fbd"
},
"execution_count": 18,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 20 entries, 0 to 19\n",
"Data columns (total 6 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Customer 20 non-null object\n",
" 1 Store 20 non-null object\n",
" 2 Product category 20 non-null object\n",
" 3 Product description 20 non-null object\n",
" 4 Sale price ($) 20 non-null int64 \n",
" 5 Profit ($) 20 non-null int64 \n",
"dtypes: int64(2), object(4)\n",
"memory usage: 1.1+ KB\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"# Contingency Table"
],
"metadata": {
"id": "_h5mvMIUFDoJ"
}
},
{
"cell_type": "code",
"source": [
"data_crosstab = pd.crosstab(data['Store'],\n",
" data['Product category'], \n",
" margins = False)\n",
"data_crosstab"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 144
},
"id": "09sV9FbgFxXe",
"outputId": "a0c3ffe6-6d85-4a3e-c0b8-0d487a21a235"
},
"execution_count": 19,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"Product category NS Game Online Game PS Game Xbox Game\n",
"Store \n",
"L.A. Store 1 2 1 4\n",
"SD Mall 3 4 3 2"
],
"text/html": [
"\n",
" <div id=\"df-4d65150e-12c4-441b-a793-6b2030b7c4fa\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>Product category</th>\n",
" <th>NS Game</th>\n",
" <th>Online Game</th>\n",
" <th>PS Game</th>\n",
" <th>Xbox Game</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Store</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>L.A. Store</th>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SD Mall</th>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-4d65150e-12c4-441b-a793-6b2030b7c4fa')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-4d65150e-12c4-441b-a793-6b2030b7c4fa button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-4d65150e-12c4-441b-a793-6b2030b7c4fa');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 19
}
]
},
{
"cell_type": "markdown",
"source": [
"# Summary tables"
],
"metadata": {
"id": "bjuVOxOhGttA"
}
},
{
"cell_type": "markdown",
"source": [
"Grouping by Customer and the showing a count of the number of observations and the sum of Sale price ($) for each row."
],
"metadata": {
"id": "5lmM6nD9GvgA"
}
},
{
"cell_type": "code",
"source": [
"data_crosstab = pd.crosstab(index=[],\n",
" values=data['Sale price ($)'], \n",
" columns=data['Customer'],\n",
" margins = False,\n",
" aggfunc=[np.size, np.sum]).stack().loc['__dummy__'].\\\n",
" rename(columns={\"size\": \"Observations\", \"sum\": \"Total Sale price ($)\"},errors=\"raise\", inplace=False)\n",
"\n",
"data_crosstab"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 395
},
"id": "1rSLPlpbHBXi",
"outputId": "335843d8-b0cc-4aab-d6d9-52e7224f3b95"
},
"execution_count": 20,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Observations Total Sale price ($)\n",
"Customer \n",
"E. Robinson 2 88\n",
"F. Tyle 1 46\n",
"J. Smith 4 174\n",
"K. Hike 1 39\n",
"K. Jonhs 5 159\n",
"P. Gales 2 65\n",
"S. Kim 2 76\n",
"S.Lee 1 49\n",
"W. Wilson 1 20\n",
"Y. Vert 1 39"
],
"text/html": [
"\n",
" <div id=\"df-e7121c8e-580f-459e-9cdb-0ad7c33b86ed\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Observations</th>\n",
" <th>Total Sale price ($)</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Customer</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>E. Robinson</th>\n",
" <td>2</td>\n",
" <td>88</td>\n",
" </tr>\n",
" <tr>\n",
" <th>F. Tyle</th>\n",
" <td>1</td>\n",
" <td>46</td>\n",
" </tr>\n",
" <tr>\n",
" <th>J. Smith</th>\n",
" <td>4</td>\n",
" <td>174</td>\n",
" </tr>\n",
" <tr>\n",
" <th>K. Hike</th>\n",
" <td>1</td>\n",
" <td>39</td>\n",
" </tr>\n",
" <tr>\n",
" <th>K. Jonhs</th>\n",
" <td>5</td>\n",
" <td>159</td>\n",
" </tr>\n",
" <tr>\n",
" <th>P. Gales</th>\n",
" <td>2</td>\n",
" <td>65</td>\n",
" </tr>\n",
" <tr>\n",
" <th>S. Kim</th>\n",
" <td>2</td>\n",
" <td>76</td>\n",
" </tr>\n",
" <tr>\n",
" <th>S.Lee</th>\n",
" <td>1</td>\n",
" <td>49</td>\n",
" </tr>\n",
" <tr>\n",
" <th>W. Wilson</th>\n",
" <td>1</td>\n",
" <td>20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Y. Vert</th>\n",
" <td>1</td>\n",
" <td>39</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-e7121c8e-580f-459e-9cdb-0ad7c33b86ed')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-e7121c8e-580f-459e-9cdb-0ad7c33b86ed button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-e7121c8e-580f-459e-9cdb-0ad7c33b86ed');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 20
}
]
},
{
"cell_type": "markdown",
"source": [
"Grouping by Store and showing a count of the number of observations and the mean Sale price ($) for each row."
],
"metadata": {
"id": "CAcRZm_XGyTw"
}
},
{
"cell_type": "code",
"source": [
"data_crosstab = pd.crosstab(index=[],\n",
" values=data['Sale price ($)'], \n",
" columns=data['Store'],\n",
" margins = False,\n",
" aggfunc=[np.size, np.mean]).stack().loc['__dummy__'].\\\n",
" rename(columns={\"size\": \"Observations\", \"mean\": \"Mean Sale price ($)\"},errors=\"raise\", inplace=False)\n",
"data_crosstab"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 144
},
"id": "JiVQ3MdloFaf",
"outputId": "ded9108c-92d3-4c1d-855f-17634fd6f94b"
},
"execution_count": 21,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Observations Mean Sale price ($)\n",
"Store \n",
"L.A. Store 8 38.50\n",
"SD Mall 12 37.25"
],
"text/html": [
"\n",
" <div id=\"df-3ecb6f13-0389-4280-a153-3f5f2585c0c0\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Observations</th>\n",
" <th>Mean Sale price ($)</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Store</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>L.A. Store</th>\n",
" <td>8</td>\n",
" <td>38.50</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SD Mall</th>\n",
" <td>12</td>\n",
" <td>37.25</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-3ecb6f13-0389-4280-a153-3f5f2585c0c0')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-3ecb6f13-0389-4280-a153-3f5f2585c0c0 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-3ecb6f13-0389-4280-a153-3f5f2585c0c0');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 21
}
]
},
{
"cell_type": "markdown",
"source": [
"Grouping by Product category and showing a count of the number of observations and the sum of the Profit ($) for each row."
],
"metadata": {
"id": "lIMHumfmG0Gg"
}
},
{
"cell_type": "code",
"source": [
"data_crosstab = pd.crosstab(index=[],\n",
" values=data['Profit ($)'], \n",
" columns=data['Product category'],\n",
" margins = False,\n",
" aggfunc=[np.size, np.sum]).stack().loc['__dummy__'].\\\n",
" rename(columns={\"size\": \"Observations\", \"sum\": \"Total Profit ($)\"},errors=\"raise\", inplace=False)\n",
"data_crosstab"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 207
},
"id": "QPvoI0PupWfB",
"outputId": "86a18c98-7944-4931-93a5-78e3ec349de2"
},
"execution_count": 22,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
" Observations Total Profit ($)\n",
"Product category \n",
"NS Game 4 16\n",
"Online Game 6 15\n",
"PS Game 4 17\n",
"Xbox Game 6 25"
],
"text/html": [
"\n",
" <div id=\"df-d6685714-d379-49c2-8200-9987dc32f190\">\n",
" <div class=\"colab-df-container\">\n",
" <div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Observations</th>\n",
" <th>Total Profit ($)</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Product category</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>NS Game</th>\n",
" <td>4</td>\n",
" <td>16</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Online Game</th>\n",
" <td>6</td>\n",
" <td>15</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PS Game</th>\n",
" <td>4</td>\n",
" <td>17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Xbox Game</th>\n",
" <td>6</td>\n",
" <td>25</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>\n",
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-d6685714-d379-49c2-8200-9987dc32f190')\"\n",
" title=\"Convert this dataframe to an interactive table.\"\n",
" style=\"display:none;\">\n",
" \n",
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
" width=\"24px\">\n",
" <path d=\"M0 0h24v24H0V0z\" fill=\"none\"/>\n",
" <path d=\"M18.56 5.44l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94zm-11 1L8.5 8.5l.94-2.06 2.06-.94-2.06-.94L8.5 2.5l-.94 2.06-2.06.94zm10 10l.94 2.06.94-2.06 2.06-.94-2.06-.94-.94-2.06-.94 2.06-2.06.94z\"/><path d=\"M17.41 7.96l-1.37-1.37c-.4-.4-.92-.59-1.43-.59-.52 0-1.04.2-1.43.59L10.3 9.45l-7.72 7.72c-.78.78-.78 2.05 0 2.83L4 21.41c.39.39.9.59 1.41.59.51 0 1.02-.2 1.41-.59l7.78-7.78 2.81-2.81c.8-.78.8-2.07 0-2.86zM5.41 20L4 18.59l7.72-7.72 1.47 1.35L5.41 20z\"/>\n",
" </svg>\n",
" </button>\n",
" \n",
" <style>\n",
" .colab-df-container {\n",
" display:flex;\n",
" flex-wrap:wrap;\n",
" gap: 12px;\n",
" }\n",
"\n",
" .colab-df-convert {\n",
" background-color: #E8F0FE;\n",
" border: none;\n",
" border-radius: 50%;\n",
" cursor: pointer;\n",
" display: none;\n",
" fill: #1967D2;\n",
" height: 32px;\n",
" padding: 0 0 0 0;\n",
" width: 32px;\n",
" }\n",
"\n",
" .colab-df-convert:hover {\n",
" background-color: #E2EBFA;\n",
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
" fill: #174EA6;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert {\n",
" background-color: #3B4455;\n",
" fill: #D2E3FC;\n",
" }\n",
"\n",
" [theme=dark] .colab-df-convert:hover {\n",
" background-color: #434B5C;\n",
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
" fill: #FFFFFF;\n",
" }\n",
" </style>\n",
"\n",
" <script>\n",
" const buttonEl =\n",
" document.querySelector('#df-d6685714-d379-49c2-8200-9987dc32f190 button.colab-df-convert');\n",
" buttonEl.style.display =\n",
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
"\n",
" async function convertToInteractive(key) {\n",
" const element = document.querySelector('#df-d6685714-d379-49c2-8200-9987dc32f190');\n",
" const dataTable =\n",
" await google.colab.kernel.invokeFunction('convertToInteractive',\n",
" [key], {});\n",
" if (!dataTable) return;\n",
"\n",
" const docLinkHtml = 'Like what you see? Visit the ' +\n",
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
" + ' to learn more about interactive tables.';\n",
" element.innerHTML = '';\n",
" dataTable['output_type'] = 'display_data';\n",
" await google.colab.output.renderOutput(dataTable, element);\n",
" const docLink = document.createElement('div');\n",
" docLink.innerHTML = docLinkHtml;\n",
" element.appendChild(docLink);\n",
" }\n",
" </script>\n",
" </div>\n",
" </div>\n",
" "
]
},
"metadata": {},
"execution_count": 22
}
]
},
{
"cell_type": "markdown",
"source": [
"# Histogram\n",
"Create a histogram of Sales price ($) using the following intervals 0 to less than 20, 20 to less than 30, 30 to less than 40, 40 to less than 50."
],
"metadata": {
"id": "mk9xwrXjG4bm"
}
},
{
"cell_type": "code",
"source": [
"data['Sale price ($)'].tolist()"
],
"metadata": {
"id": "87VmOet01GXx",
"outputId": "7443b2be-067e-44c8-e29d-5a36b539483a",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": 36,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"[49,\n",
" 45,\n",
" 35,\n",
" 45,\n",
" 49,\n",
" 39,\n",
" 46,\n",
" 15,\n",
" 20,\n",
" 40,\n",
" 45,\n",
" 39,\n",
" 39,\n",
" 49,\n",
" 20,\n",
" 45,\n",
" 39,\n",
" 20,\n",
" 56,\n",
" 20]"
]
},
"metadata": {},
"execution_count": 36
}
]
},
{
"cell_type": "code",
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"plt.hist(data['Sale price ($)'].tolist(), bins=[20,30,40,50])\n",
"plt.show()"
],
"metadata": {
"id": "c1bBf_Aj0taL",
"outputId": "bc6d090c-876c-4388-db5d-1409f2ac6c2d",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 265
}
},
"execution_count": 39,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
],
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAALdElEQVR4nO3dX4yld13H8feH3SK0NBbspKnd1mmUaBoSWzJisYbERU2lBDQhpsQSNCSrCWgxRNh6gyaaQKL8uTAkawGbUK2klEBagzS0XHizMtuulu5CRFigdaFDIgJeUCtfL84zdRx3dp7dnWfP98y+X8lkz59nTr6//LLvOfvMOWdTVUiS+nrOvAeQJJ2eoZak5gy1JDVnqCWpOUMtSc3tneJBL7/88lpeXp7ioSVpVzpy5Mi3qmrpVPdNEurl5WVWV1eneGhJ2pWSfHWr+zz1IUnNGWpJas5QS1JzhlqSmjPUktScoZak5gy1JDVnqCWpOUMtSc1N8s5ESdNbPvjAvEfQJifedcskj+szaklqzlBLUnOGWpKaM9SS1JyhlqTmDLUkNWeoJak5Qy1JzRlqSWrOUEtSc4Zakpoz1JLUnKGWpOYMtSQ1Z6glqTlDLUnNGWpJas5QS1JzhlqSmhsV6iS/n+TxJJ9P8jdJnjf1YJKkmW1DneQq4PeAlap6CbAHuHXq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go0neBHwV+PU5zXcmtlrL64eXGRVwAvjt+Yx3Rq4E7srsP4x4DvDRqro/yTHgniR/AjzK7AdTZ1ut46EkS0CAo8DvzHPIc/QOFmtPTufuBdyXK4CPz362sBf466r6VJLPscMN8y3kktTc3H+ZKEk6PUMtSc0ZaklqzlBLUnOGWpKaM9SS1JyhlqTm/gebtgd76hRCUgAAAABJRU5ErkJggg==\n"
},
"metadata": {
"needs_background": "light"
}
}
]
},
{
"cell_type": "markdown",
"source": [
"# Scatterplots\n",
"Create a scatterplot showing Sales price (\\$) against Profit (\\$)"
],
"metadata": {
"id": "QBH7GUYhG9Q2"
}
},
{
"cell_type": "code",
"source": [
"data.plot.scatter(x='Sale price ($)',\n",
" y='Profit ($)')"
],
"metadata": {
"id": "mF9F2mV_GtQV",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 298
},
"outputId": "a2f2d8d0-0d87-4341-9e11-04cee1635264"
},
"execution_count": 44,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f58825c1bd0>"
]
},
"metadata": {},
"execution_count": 44
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
],
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAaSElEQVR4nO3df5DcdZ3n8eerk9mZnIkSJrMYM8GgwbUQhwh9CBVBwHVLJRduDe7C6QquVBYLTqzSStS9A6WOqjN7x7lIaS4bLH74AygCggi7pAQWqFpgOzEZCFmWuYU1k0UyGSaQWZNxYr/vj+832DP0TM8k8+2enu/rUdU1/f1+P93fd3+nv/3q74/+fBURmJlZfhUaXYCZmTWWg8DMLOccBGZmOecgMDP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/dHxJT8RmCC87wHWBMRL1SM+0ZEfGNUu8eACyJioF612czhXUNm09tXSQ4aV3q0ckBSB3C9Q8COlLcIzMxyzlsEZmY55yAwM8s5B4GZWc45CMzMcs5BYGaWc/8fgqZO0haiHW4AAAAASUVORK5CYII=\n"
},
"metadata": {
"needs_background": "light"
}
}
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "Yxy4KL8Y2Heg"
},
"execution_count": null,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment