From 829ac01d47d24837f52b9d1b8731d68c5da71cf7 Mon Sep 17 00:00:00 2001 From: SaiSriLaxmi7 <162073125+SaiSriLaxmi7@users.noreply.github.com> Date: Wed, 4 Mar 2026 23:18:08 +0000 Subject: [PATCH] Main --- .vscode/settings.json | 1 - Chapter 5/Dashboard.ipynb | 1532 ++++--------------------------------- 2 files changed, 155 insertions(+), 1378 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 66874f2..eceb2a3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,7 +17,6 @@ "files.autoSave": "afterDelay", "screencastMode.onlyKeyboardShortcuts": true, "terminal.integrated.fontSize": 18, - "workbench.activityBar.visible": true, "workbench.colorTheme": "Visual Studio Dark", "workbench.fontAliasing": "antialiased", "workbench.statusBar.visible": true, diff --git a/Chapter 5/Dashboard.ipynb b/Chapter 5/Dashboard.ipynb index 04da244..64c8e76 100644 --- a/Chapter 5/Dashboard.ipynb +++ b/Chapter 5/Dashboard.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -11,12 +11,94 @@ "import sqlalchemy as sa\n", "import plotly.express as px\n", "import plotly.graph_objects as go\n", - "from sqlalchemy.engine import create_engine" + "from sqlalchemy.engine import create_engine\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Tables_in_hplussport
0Customer
1OrderItem
2Orders
3Product
4Salesperson
\n", + "
" + ], + "text/plain": [ + " Tables_in_hplussport\n", + "0 Customer\n", + "1 OrderItem\n", + "2 Orders\n", + "3 Product\n", + "4 Salesperson" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pandas as pd\n", + "\n", + "pd.read_sql(\"SHOW TABLES;\", engine)" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -27,7 +109,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 8, "metadata": {}, "outputs": [ { @@ -51,1425 +133,121 @@ " \n", " \n", " \n", - " OrderDate\n", - " Salesperson\n", - " Amount of Orders\n", - " Total Due\n", + " OrderID\n", + " CreationDate\n", + " TotalDue\n", + " Status\n", + " CustomerID\n", + " SalespersonID\n", " \n", " \n", " \n", " \n", " 0\n", - " 2015-06-05\n", - " Jane Larson\n", - " 1\n", - " 166.99\n", + " 1000\n", + " 2016-05-14\n", + " 118.22\n", + " paid\n", + " 413\n", + " 130\n", " \n", " \n", " 1\n", - " 2015-06-07\n", - " Sara Cox\n", - " 1\n", - " 192.79\n", + " 1001\n", + " 2016-07-31\n", + " 211.22\n", + " returned\n", + " 128\n", + " 102\n", " \n", " \n", " 2\n", - " 2015-06-08\n", - " Jack Powell\n", - " 1\n", - " 62.65\n", + " 1002\n", + " 2016-07-09\n", + " 139.81\n", + " past due\n", + " 791\n", + " 115\n", " \n", " \n", " 3\n", - " 2015-06-13\n", - " Carlos James\n", - " 1\n", - " 201.36\n", + " 1003\n", + " 2016-04-04\n", + " 323.71\n", + " paid\n", + " 974\n", + " 139\n", " \n", " \n", " 4\n", - " 2015-06-13\n", - " James Ortiz\n", - " 1\n", - " 22.03\n", + " 1004\n", + " 2016-02-16\n", + " 214.02\n", + " paid\n", + " 866\n", + " 102\n", " \n", " \n", "\n", "" ], "text/plain": [ - " OrderDate Salesperson Amount of Orders Total Due\n", - "0 2015-06-05 Jane Larson 1 166.99\n", - "1 2015-06-07 Sara Cox 1 192.79\n", - "2 2015-06-08 Jack Powell 1 62.65\n", - "3 2015-06-13 Carlos James 1 201.36\n", - "4 2015-06-13 James Ortiz 1 22.03" + " OrderID CreationDate TotalDue Status CustomerID SalespersonID\n", + "0 1000 2016-05-14 118.22 paid 413 130\n", + "1 1001 2016-07-31 211.22 returned 128 102\n", + "2 1002 2016-07-09 139.81 past due 791 115\n", + "3 1003 2016-04-04 323.71 paid 974 139\n", + "4 1004 2016-02-16 214.02 paid 866 102" ] }, - "execution_count": 4, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Let's take a peak at our data. This code shows the first 5 records\n", - "df = pd.read_sql_query(\"SELECT * FROM V_Orders\",\n", + "df = pd.read_sql_query(\"SELECT * FROM Orders\",\n", " connection)\n", "df.head()" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 11, "metadata": {}, "outputs": [ { - "data": { - "text/html": [ - " \n", - " " - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.plotly.v1+json": { - "config": { - "plotlyServerURL": "https://plot.ly" - }, - "data": [ - { - "alignmentgroup": "True", - "hovertemplate": "OrderDate=%{x}
Total Due=%{y}", - "legendgroup": "", - "marker": { - "color": "#636efa", - "pattern": { - "shape": "" - } - }, - "name": "", - "offsetgroup": "", - "orientation": "v", - "showlegend": false, - "textposition": "auto", - "type": "bar", - "x": [ - "2015-06-05T00:00:00", - "2015-06-07T00:00:00", - "2015-06-08T00:00:00", - "2015-06-13T00:00:00", - "2015-06-13T00:00:00", - "2015-06-15T00:00:00", - "2015-06-19T00:00:00", - "2015-06-21T00:00:00", - "2015-06-23T00:00:00", - "2015-06-24T00:00:00", - "2015-06-24T00:00:00", - "2015-06-25T00:00:00", - "2015-06-30T00:00:00", - "2015-06-30T00:00:00", - "2015-06-30T00:00:00", - "2015-06-30T00:00:00", - "2015-07-06T00:00:00", - "2015-07-09T00:00:00", - "2015-07-12T00:00:00", - "2015-07-15T00:00:00", - "2015-07-25T00:00:00", - "2015-07-25T00:00:00", - "2015-07-25T00:00:00", - "2015-07-26T00:00:00", - "2015-07-29T00:00:00", - "2015-07-31T00:00:00", - "2015-08-02T00:00:00", - "2015-08-02T00:00:00", - "2015-08-04T00:00:00", - "2015-08-06T00:00:00", - "2015-08-09T00:00:00", - "2015-08-14T00:00:00", - "2015-08-15T00:00:00", - "2015-08-19T00:00:00", - "2015-08-21T00:00:00", - "2015-08-21T00:00:00", - "2015-08-22T00:00:00", - "2015-08-26T00:00:00", - "2015-09-01T00:00:00", - "2015-09-01T00:00:00", - "2015-09-10T00:00:00", - "2015-09-11T00:00:00", - "2015-09-19T00:00:00", - "2015-09-20T00:00:00", - "2015-09-22T00:00:00", - "2015-09-23T00:00:00", - "2015-09-24T00:00:00", - "2015-10-02T00:00:00", - "2015-10-03T00:00:00", - "2015-10-08T00:00:00", - "2015-10-09T00:00:00", - "2015-10-11T00:00:00", - "2015-10-12T00:00:00", - "2015-10-17T00:00:00", - "2015-10-20T00:00:00", - "2015-10-20T00:00:00", - "2015-10-26T00:00:00", - "2015-10-29T00:00:00", - "2015-10-31T00:00:00", - "2015-11-01T00:00:00", - "2015-11-01T00:00:00", - "2015-11-02T00:00:00", - "2015-11-08T00:00:00", - "2015-11-08T00:00:00", - "2015-11-09T00:00:00", - "2015-11-09T00:00:00", - "2015-11-12T00:00:00", - "2015-11-12T00:00:00", - "2015-11-15T00:00:00", - "2015-11-16T00:00:00", - "2015-11-17T00:00:00", - "2015-11-19T00:00:00", - "2015-11-19T00:00:00", - "2015-11-22T00:00:00", - "2015-11-22T00:00:00", - "2015-11-26T00:00:00", - "2015-11-27T00:00:00", - "2015-11-30T00:00:00", - "2015-12-04T00:00:00", - "2015-12-08T00:00:00", - "2015-12-14T00:00:00", - "2015-12-19T00:00:00", - "2015-12-20T00:00:00", - "2015-12-20T00:00:00", - "2015-12-25T00:00:00", - "2015-12-25T00:00:00", - "2015-12-30T00:00:00", - "2016-01-01T00:00:00", - "2016-01-06T00:00:00", - "2016-01-08T00:00:00", - "2016-01-09T00:00:00", - "2016-01-11T00:00:00", - "2016-01-11T00:00:00", - "2016-01-12T00:00:00", - "2016-01-13T00:00:00", - "2016-01-15T00:00:00", - "2016-01-16T00:00:00", - "2016-01-17T00:00:00", - "2016-01-25T00:00:00", - "2016-01-25T00:00:00", - "2016-01-26T00:00:00", - "2016-02-01T00:00:00", - "2016-02-03T00:00:00", - "2016-02-03T00:00:00", - "2016-02-09T00:00:00", - "2016-02-09T00:00:00", - "2016-02-11T00:00:00", - "2016-02-12T00:00:00", - "2016-02-13T00:00:00", - "2016-02-13T00:00:00", - "2016-02-15T00:00:00", - "2016-02-15T00:00:00", - "2016-02-16T00:00:00", - "2016-02-19T00:00:00", - "2016-02-19T00:00:00", - "2016-02-25T00:00:00", - "2016-02-26T00:00:00", - "2016-02-27T00:00:00", - "2016-02-28T00:00:00", - "2016-02-29T00:00:00", - "2016-02-29T00:00:00", - "2016-03-02T00:00:00", - "2016-03-03T00:00:00", - "2016-03-03T00:00:00", - "2016-03-12T00:00:00", - "2016-03-13T00:00:00", - "2016-03-13T00:00:00", - "2016-03-16T00:00:00", - "2016-03-18T00:00:00", - "2016-03-22T00:00:00", - "2016-03-24T00:00:00", - "2016-03-29T00:00:00", - "2016-04-02T00:00:00", - "2016-04-02T00:00:00", - "2016-04-03T00:00:00", - "2016-04-04T00:00:00", - "2016-04-06T00:00:00", - "2016-04-08T00:00:00", - "2016-04-10T00:00:00", - "2016-04-11T00:00:00", - "2016-04-12T00:00:00", - "2016-04-17T00:00:00", - "2016-04-19T00:00:00", - "2016-04-24T00:00:00", - "2016-05-01T00:00:00", - "2016-05-04T00:00:00", - "2016-05-05T00:00:00", - "2016-05-05T00:00:00", - "2016-05-08T00:00:00", - "2016-05-10T00:00:00", - "2016-05-12T00:00:00", - "2016-05-14T00:00:00", - "2016-05-18T00:00:00", - "2016-05-18T00:00:00", - "2016-05-19T00:00:00", - "2016-05-19T00:00:00", - "2016-05-23T00:00:00", - "2016-05-24T00:00:00", - "2016-05-27T00:00:00", - "2016-05-27T00:00:00", - "2016-05-28T00:00:00", - "2016-06-01T00:00:00", - "2016-06-09T00:00:00", - "2016-06-12T00:00:00", - "2016-06-12T00:00:00", - "2016-06-15T00:00:00", - "2016-06-19T00:00:00", - "2016-06-19T00:00:00", - "2016-06-20T00:00:00", - "2016-06-23T00:00:00", - "2016-06-23T00:00:00", - "2016-06-26T00:00:00", - "2016-06-27T00:00:00", - "2016-06-29T00:00:00", - "2016-06-29T00:00:00", - "2016-06-30T00:00:00", - "2016-07-01T00:00:00", - "2016-07-02T00:00:00", - "2016-07-02T00:00:00", - "2016-07-03T00:00:00", - "2016-07-04T00:00:00", - "2016-07-04T00:00:00", - "2016-07-05T00:00:00", - "2016-07-05T00:00:00", - "2016-07-08T00:00:00", - "2016-07-09T00:00:00", - "2016-07-11T00:00:00", - "2016-07-13T00:00:00", - "2016-07-15T00:00:00", - "2016-07-16T00:00:00", - "2016-07-18T00:00:00", - "2016-07-19T00:00:00", - "2016-07-19T00:00:00", - "2016-07-25T00:00:00", - "2016-07-27T00:00:00", - "2016-07-30T00:00:00", - "2016-07-31T00:00:00", - "2016-08-01T00:00:00", - "2016-08-08T00:00:00", - "2016-08-09T00:00:00" - ], - "xaxis": "x", - "y": [ - 166.99, - 192.79, - 62.65, - 201.36, - 22.03, - 451.43, - 198.3, - 217.3, - 283.53, - 221.4, - 130.17, - 98.45, - 58.38, - 32.65, - 157.13, - 232.47, - 277.36, - 196.9, - 62.65, - 108.69, - 199.25, - 93.08, - 212.15, - 168.89, - 276.01, - 127.61, - 40.59, - 337.12, - 144.6, - 26.85, - 67.44, - 22.34, - 168.42, - 206.67, - 57.28, - 273.87, - 207.11, - 220.55, - 218.07, - 24.78, - 404.25, - 112.38, - 143.89, - 416.31, - 127.5, - 241.34, - 238.45, - 284.33, - 105.61, - 3.58, - 13.95, - 216.59, - 97.54, - 226.69, - 145.18, - 277.58, - 84.87, - 259.54, - 275.49, - 218.1, - 161.51, - 99.63, - 35.8, - 236.08, - 32.22, - 334.53, - 273.45, - 97.51, - 134.19, - 276.75, - 242.66, - 125.46, - 153.94, - 373.99, - 393.13, - 122.24, - 74.49, - 244.51, - 41.17, - 115.41, - 66.42, - 315.83, - 187.12, - 210.33, - 206.12, - 198.41, - 53.7, - 132.84, - 36.9, - 125.3, - 168.26, - 275.66, - 113.1, - 106.27, - 638.29, - 101.01, - 130.2, - 208.24, - 228.78, - 66.42, - 194.36, - 153.94, - 280.44, - 277.75, - 114.56, - 81.87, - 7.38, - 169.74, - 64.44, - 186.42, - 12.53, - 198.27, - 214.02, - 226.88, - 195.57, - 312.91, - 227.46, - 141.41, - 30.43, - 285.62, - 233.08, - 366.99, - 191.88, - 515.06, - 331.88, - 206.89, - 241.09, - 44.75, - 218.9, - 261.23, - 84.87, - 68.68, - 465.58, - 147.6, - 112.77, - 323.71, - 374.48, - 258.3, - 17.9, - 143.91, - 426.61, - 25.06, - 396.18, - 101.47, - 250.92, - 107.01, - 142.59, - 55.35, - 462.66, - 283.39, - 277.47, - 118.22, - 30.43, - 136.53, - 488.13, - 143.06, - 507.35, - 42.96, - 155.89, - 48.33, - 192.68, - 75.18, - 265.35, - 291.1, - 169.74, - 44.75, - 60.86, - 136.45, - 143.91, - 276.01, - 20.22, - 66.42, - 62.73, - 277.22, - 217.71, - 12.53, - 276.78, - 78.76, - 225.09, - 219.64, - 189.79, - 36.9, - 290.63, - 269.65, - 558.9, - 139.81, - 199.26, - 263.24, - 129.15, - 21.48, - 290.44, - 60.86, - 151.98, - 7.38, - 317.59, - 34.01, - 211.22, - 371.76, - 287.82, - 482.54 - ], - "yaxis": "y" - } - ], - "layout": { - "barmode": "relative", - "legend": { - "tracegroupgap": 0 - }, - "margin": { - "t": 60 - }, - "template": { - "data": { - "bar": [ - { - "error_x": { - "color": "#2a3f5f" - }, - "error_y": { - "color": "#2a3f5f" - }, - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "baxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "type": "carpet" - } - ], - "choropleth": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "choropleth" - } - ], - "contour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "contour" - } - ], - "contourcarpet": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "contourcarpet" - } - ], - "heatmap": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmap" - } - ], - "heatmapgl": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmapgl" - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "histogram2d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2d" - } - ], - "histogram2dcontour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2dcontour" - } - ], - "mesh3d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "mesh3d" - } - ], - "parcoords": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "parcoords" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ], - "scatter": [ - { - "fillpattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - }, - "type": "scatter" - } - ], - "scatter3d": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatter3d" - } - ], - "scattercarpet": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattercarpet" - } - ], - "scattergeo": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergeo" - } - ], - "scattergl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergl" - } - ], - "scattermapbox": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattermapbox" - } - ], - "scatterpolar": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolar" - } - ], - "scatterpolargl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolargl" - } - ], - "scatterternary": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterternary" - } - ], - "surface": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "surface" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#EBF0F8" - }, - "line": { - "color": "white" - } - }, - "header": { - "fill": { - "color": "#C8D4E3" - }, - "line": { - "color": "white" - } - }, - "type": "table" - } - ] - }, - "layout": { - "annotationdefaults": { - "arrowcolor": "#2a3f5f", - "arrowhead": 0, - "arrowwidth": 1 - }, - "autotypenumbers": "strict", - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ], - "sequential": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ] - }, - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#2a3f5f" - }, - "geo": { - "bgcolor": "white", - "lakecolor": "white", - "landcolor": "#E5ECF6", - "showlakes": true, - "showland": true, - "subunitcolor": "white" - }, - "hoverlabel": { - "align": "left" - }, - "hovermode": "closest", - "mapbox": { - "style": "light" - }, - "paper_bgcolor": "white", - "plot_bgcolor": "#E5ECF6", - "polar": { - "angularaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "radialaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "scene": { - "xaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "yaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "zaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - } - }, - "shapedefaults": { - "line": { - "color": "#2a3f5f" - } - }, - "ternary": { - "aaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "baxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "caxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "title": { - "x": 0.05 - }, - "xaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - }, - "yaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - } - } - }, - "xaxis": { - "anchor": "y", - "domain": [ - 0, - 1 - ], - "title": { - "text": "OrderDate" - } - }, - "yaxis": { - "anchor": "x", - "domain": [ - 0, - 1 - ], - "title": { - "text": "Total Due" - } - } - } - }, - "text/html": [ - "
" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "Index(['OrderID', 'CreationDate', 'TotalDue', 'Status', 'CustomerID',\n", + " 'SalespersonID'],\n", + " dtype='str')\n" + ] } ], "source": [ - "#Now we'll make a simple bar chart of sales by year\n", - "fig = px.bar(df, x='OrderDate', y='Total Due')\n", - "fig.show()" + "print(df.columns)" ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": {}, "outputs": [ { @@ -1574,7 +352,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.4" + "version": "3.13.6" }, "orig_nbformat": 4 },