From f39de8e95d99bbf3c91ccd4061ab6142d384d9ae Mon Sep 17 00:00:00 2001 From: Sumedh Patil Date: Sun, 20 Mar 2022 10:13:02 +0530 Subject: [PATCH 1/6] First commit --- .../cloud_price_analysis_azure.ipynb | 2065 +++++++++++++++++ 1 file changed, 2065 insertions(+) create mode 100644 notebooks/experimental/cloud_price_analysis_azure.ipynb diff --git a/notebooks/experimental/cloud_price_analysis_azure.ipynb b/notebooks/experimental/cloud_price_analysis_azure.ipynb new file mode 100644 index 0000000..3e02236 --- /dev/null +++ b/notebooks/experimental/cloud_price_analysis_azure.ipynb @@ -0,0 +1,2065 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Analysis of Azure Pricing details, \n", + "#### source JSON file https://prices.azure.com/api/retail/prices?api-version=2021-10-01-preview&meterRegion=%E2%80%99primary%E2%80%99" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T07:05:20.304539Z", + "start_time": "2022-03-19T07:05:06.400775Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting matplotlib\n", + " Downloading matplotlib-3.3.4-cp36-cp36m-manylinux1_x86_64.whl (11.5 MB)\n", + "\u001b[K |████████████████████████████████| 11.5 MB 7.5 MB/s eta 0:00:01 |████████████████▋ | 6.0 MB 7.5 MB/s eta 0:00:01\n", + "\u001b[?25hRequirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /opt/app-root/lib/python3.6/site-packages (from matplotlib) (2.4.7)\n", + "Requirement already satisfied: numpy>=1.15 in /opt/app-root/lib/python3.6/site-packages (from matplotlib) (1.19.4)\n", + "Requirement already satisfied: python-dateutil>=2.1 in /opt/app-root/lib/python3.6/site-packages (from matplotlib) (2.8.1)\n", + "Collecting cycler>=0.10\n", + " Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)\n", + "Collecting kiwisolver>=1.0.1\n", + " Downloading kiwisolver-1.3.1-cp36-cp36m-manylinux1_x86_64.whl (1.1 MB)\n", + "\u001b[K |████████████████████████████████| 1.1 MB 31.8 MB/s eta 0:00:01\n", + "\u001b[?25hCollecting pillow>=6.2.0\n", + " Downloading Pillow-8.4.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\n", + "\u001b[K |████████████████████████████████| 3.1 MB 32.0 MB/s eta 0:00:01\n", + "\u001b[?25hRequirement already satisfied: six>=1.5 in /opt/app-root/lib/python3.6/site-packages (from python-dateutil>=2.1->matplotlib) (1.15.0)\n", + "Installing collected packages: pillow, kiwisolver, cycler, matplotlib\n", + "Successfully installed cycler-0.11.0 kiwisolver-1.3.1 matplotlib-3.3.4 pillow-8.4.0\n", + "\u001b[33mWARNING: You are using pip version 20.3.1; however, version 21.3.1 is available.\n", + "You should consider upgrading via the '/opt/app-root/bin/python3.6 -m pip install --upgrade pip' command.\u001b[0m\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], + "source": [ + "pip install matplotlib" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T07:05:45.713310Z", + "start_time": "2022-03-19T07:05:45.050837Z" + } + }, + "outputs": [], + "source": [ + "import json as json\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from collections import defaultdict\n", + "import requests\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Access the API end point for 'Vitual Machine' and create JSON file ../data/raw/" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T07:05:50.617950Z", + "start_time": "2022-03-19T07:05:49.822359Z" + } + }, + "outputs": [], + "source": [ + "r = requests.get('https://prices.azure.com/api/retail/prices?$filter=serviceName eq \\'Virtual Machines\\'')\n", + "with open('../../data/raw/azure_vm.json','w') as fd:\n", + " fd.write(r.text)\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T07:06:40.226142Z", + "start_time": "2022-03-19T07:06:40.118719Z" + } + }, + "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", + " \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", + "
BillingCurrencyCustomerEntityIdCustomerEntityTypeItemsNextPageLinkCount
0USDDefaultRetail{'currencyCode': 'USD', 'tierMinimumUnits': 0....https://prices.azure.com:443/api/retail/prices...100
1USDDefaultRetail{'currencyCode': 'USD', 'tierMinimumUnits': 0....https://prices.azure.com:443/api/retail/prices...100
2USDDefaultRetail{'currencyCode': 'USD', 'tierMinimumUnits': 0....https://prices.azure.com:443/api/retail/prices...100
3USDDefaultRetail{'currencyCode': 'USD', 'tierMinimumUnits': 0....https://prices.azure.com:443/api/retail/prices...100
4USDDefaultRetail{'currencyCode': 'USD', 'tierMinimumUnits': 0....https://prices.azure.com:443/api/retail/prices...100
\n", + "
" + ], + "text/plain": [ + " BillingCurrency CustomerEntityId CustomerEntityType \\\n", + "0 USD Default Retail \n", + "1 USD Default Retail \n", + "2 USD Default Retail \n", + "3 USD Default Retail \n", + "4 USD Default Retail \n", + "\n", + " Items \\\n", + "0 {'currencyCode': 'USD', 'tierMinimumUnits': 0.... \n", + "1 {'currencyCode': 'USD', 'tierMinimumUnits': 0.... \n", + "2 {'currencyCode': 'USD', 'tierMinimumUnits': 0.... \n", + "3 {'currencyCode': 'USD', 'tierMinimumUnits': 0.... \n", + "4 {'currencyCode': 'USD', 'tierMinimumUnits': 0.... \n", + "\n", + " NextPageLink Count \n", + "0 https://prices.azure.com:443/api/retail/prices... 100 \n", + "1 https://prices.azure.com:443/api/retail/prices... 100 \n", + "2 https://prices.azure.com:443/api/retail/prices... 100 \n", + "3 https://prices.azure.com:443/api/retail/prices... 100 \n", + "4 https://prices.azure.com:443/api/retail/prices... 100 " + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.read_json(\"../../data/raw/azure_vm.json\")\n", + "df.head()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Understand shape of data" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T07:06:49.822336Z", + "start_time": "2022-03-19T07:06:49.765094Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Shape of the data\n", + "\n", + " (100, 6)\n", + "\n", + "\n", + "\n", + "Is null?\n", + "\n", + " BillingCurrency 0\n", + "CustomerEntityId 0\n", + "CustomerEntityType 0\n", + "Items 0\n", + "NextPageLink 0\n", + "Count 0\n", + "dtype: int64\n", + "\n", + "\n", + "\n", + "Columnwise Datatype\n", + "\n", + " BillingCurrency object\n", + "CustomerEntityId object\n", + "CustomerEntityType object\n", + "Items object\n", + "NextPageLink object\n", + "Count int64\n", + "dtype: object\n" + ] + }, + { + "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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Count
count100.0
mean100.0
std0.0
min100.0
25%100.0
50%100.0
75%100.0
max100.0
\n", + "
" + ], + "text/plain": [ + " Count\n", + "count 100.0\n", + "mean 100.0\n", + "std 0.0\n", + "min 100.0\n", + "25% 100.0\n", + "50% 100.0\n", + "75% 100.0\n", + "max 100.0" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "print(\"Shape of the data\\n\\n\", df.shape)\n", + "print(\"\\n\\n\")\n", + "print(\"Is null?\\n\\n\", df.isnull().sum())\n", + "print(\"\\n\\n\")\n", + "print(\"Columnwise Datatype\\n\\n\", df.dtypes)\n", + "df.describe()\n" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T14:03:07.786946Z", + "start_time": "2022-03-19T14:03:07.715791Z" + } + }, + "outputs": [], + "source": [ + "#### Split data into multiple components, create series out of dataframes, List \"Items\" is carrying actual data items" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T14:16:27.143679Z", + "start_time": "2022-03-19T14:16:27.129724Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": [ + "100" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_items = df[\"Items\"]\n", + "df_items = df_items.fillna(\"NA\")\n", + "type(df_items)\n", + "dfi_l=len(df_items)\n", + "dfi_l\n" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T14:17:03.108462Z", + "start_time": "2022-03-19T14:17:03.081948Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": [ + "0 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "1 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "2 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "3 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "4 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + " ... \n", + "95 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "96 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "97 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "98 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "99 {'currencyCode': 'USD', 'tierMinimumUnits': 0....\n", + "Name: Items, Length: 100, dtype: object" + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#print dict\n", + "df_items" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Normalize data into tabular format" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T14:17:20.627698Z", + "start_time": "2022-03-19T14:17:20.480034Z" + } + }, + "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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
currencyCodetierMinimumUnitsretailPriceunitPricearmRegionNamelocationeffectiveStartDatemeterIdmeterNameproductId...productNameskuNameserviceNameserviceIdserviceFamilyunitOfMeasuretypeisPrimaryMeterRegionarmSkuNamereservationTerm
0USD0.00.5425060.542506southindiaIN South2022-03-01T00:00:00Z000009d0-057f-5f2b-b7e9-9e26add324a8D14/DS14 SpotDZH318Z0BPVW...Virtual Machines D Series WindowsD14 SpotVirtual MachinesDZH313Z7MMC8Compute1 HourConsumptionTrueStandard_D14NaN
1USD0.00.2627520.262752southindiaIN South2022-03-01T00:00:00Z000009d0-057f-5f2b-b7e9-9e26add324a8D14/DS14 SpotDZH318Z0BPVW...Virtual Machines D Series WindowsD14 SpotVirtual MachinesDZH313Z7MMC8Compute1 HourDevTestConsumptionTrueStandard_D14NaN
2USD0.01.4680061.468006eastasiaAP East2022-03-01T00:00:00Z00014e7d-fff9-54dd-962e-4e992887ad3cD64s v5 SpotDZH318Z08M9T...Virtual Machines Dsv5 Series WindowsStandard_D64s_v5 SpotVirtual MachinesDZH313Z7MMC8Compute1 HourConsumptionTrueStandard_D64s_v5NaN
3USD0.00.8650750.865075eastasiaAP East2022-03-01T00:00:00Z00014e7d-fff9-54dd-962e-4e992887ad3cD64s v5 SpotDZH318Z08M9T...Virtual Machines Dsv5 Series WindowsStandard_D64s_v5 SpotVirtual MachinesDZH313Z7MMC8Compute1 HourDevTestConsumptionTrueStandard_D64s_v5NaN
4USD0.00.0629880.062988uknorthUK North2019-10-16T00:00:00Z0001e46a-9285-5fa8-b48a-240e307a24f7A3 SpotDZH318Z0BPVJ...Virtual Machines A Series WindowsA3 SpotVirtual MachinesDZH313Z7MMC8Compute1 HourDevTestConsumptionTrueStandard_A3NaN
..................................................................
95USD0.00.2720000.272000uaecentralAE Central2021-11-01T00:00:00Z001fa4dd-bbe2-5502-b172-8a1af70ea8b8D2ds v5DZH318Z08MC5...Virtual Machines Ddsv5 Series WindowsStandard_D2ds_v5Virtual MachinesDZH313Z7MMC8Compute1 HourConsumptionTrueStandard_D2ds_v5NaN
96USD0.00.1800000.180000uaecentralAE Central2021-11-01T00:00:00Z001fa4dd-bbe2-5502-b172-8a1af70ea8b8D2ds v5DZH318Z08MC5...Virtual Machines Ddsv5 Series WindowsStandard_D2ds_v5Virtual MachinesDZH313Z7MMC8Compute1 HourDevTestConsumptionTrueStandard_D2ds_v5NaN
97USD0.01.9490001.949000uksouthUK South2021-11-01T00:00:00Z001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3D48s v5 Low PriorityDZH318Z08M9T...Virtual Machines Dsv5 Series WindowsStandard_D48s_v5 Low PriorityVirtual MachinesDZH313Z7MMC8Compute1 HourConsumptionTrueStandard_D48s_v5NaN
98USD0.00.5330000.533000uksouthUK South2021-11-01T00:00:00Z001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3D48s v5 Low PriorityDZH318Z08M9T...Virtual Machines Dsv5 Series WindowsStandard_D48s_v5 Low PriorityVirtual MachinesDZH313Z7MMC8Compute1 HourDevTestConsumptionTrueStandard_D48s_v5NaN
99USD0.032.06400032.064000eastus2US East 22021-01-01T00:00:00Z00204db1-b465-59e2-baa7-bc6b848c5b78M192idms_v2DZH318Z08LV0...Virtual Machines MdSv2 Series WindowsM192idms_v2Virtual MachinesDZH313Z7MMC8Compute1 HourDevTestConsumptionTrueStandard_M192idms_v2NaN
\n", + "

100 rows × 21 columns

\n", + "
" + ], + "text/plain": [ + " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", + "0 USD 0.0 0.542506 0.542506 southindia \n", + "1 USD 0.0 0.262752 0.262752 southindia \n", + "2 USD 0.0 1.468006 1.468006 eastasia \n", + "3 USD 0.0 0.865075 0.865075 eastasia \n", + "4 USD 0.0 0.062988 0.062988 uknorth \n", + ".. ... ... ... ... ... \n", + "95 USD 0.0 0.272000 0.272000 uaecentral \n", + "96 USD 0.0 0.180000 0.180000 uaecentral \n", + "97 USD 0.0 1.949000 1.949000 uksouth \n", + "98 USD 0.0 0.533000 0.533000 uksouth \n", + "99 USD 0.0 32.064000 32.064000 eastus2 \n", + "\n", + " location effectiveStartDate meterId \\\n", + "0 IN South 2022-03-01T00:00:00Z 000009d0-057f-5f2b-b7e9-9e26add324a8 \n", + "1 IN South 2022-03-01T00:00:00Z 000009d0-057f-5f2b-b7e9-9e26add324a8 \n", + "2 AP East 2022-03-01T00:00:00Z 00014e7d-fff9-54dd-962e-4e992887ad3c \n", + "3 AP East 2022-03-01T00:00:00Z 00014e7d-fff9-54dd-962e-4e992887ad3c \n", + "4 UK North 2019-10-16T00:00:00Z 0001e46a-9285-5fa8-b48a-240e307a24f7 \n", + ".. ... ... ... \n", + "95 AE Central 2021-11-01T00:00:00Z 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 \n", + "96 AE Central 2021-11-01T00:00:00Z 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 \n", + "97 UK South 2021-11-01T00:00:00Z 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 \n", + "98 UK South 2021-11-01T00:00:00Z 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 \n", + "99 US East 2 2021-01-01T00:00:00Z 00204db1-b465-59e2-baa7-bc6b848c5b78 \n", + "\n", + " meterName productId ... \\\n", + "0 D14/DS14 Spot DZH318Z0BPVW ... \n", + "1 D14/DS14 Spot DZH318Z0BPVW ... \n", + "2 D64s v5 Spot DZH318Z08M9T ... \n", + "3 D64s v5 Spot DZH318Z08M9T ... \n", + "4 A3 Spot DZH318Z0BPVJ ... \n", + ".. ... ... ... \n", + "95 D2ds v5 DZH318Z08MC5 ... \n", + "96 D2ds v5 DZH318Z08MC5 ... \n", + "97 D48s v5 Low Priority DZH318Z08M9T ... \n", + "98 D48s v5 Low Priority DZH318Z08M9T ... \n", + "99 M192idms_v2 DZH318Z08LV0 ... \n", + "\n", + " productName skuName \\\n", + "0 Virtual Machines D Series Windows D14 Spot \n", + "1 Virtual Machines D Series Windows D14 Spot \n", + "2 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", + "3 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", + "4 Virtual Machines A Series Windows A3 Spot \n", + ".. ... ... \n", + "95 Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 \n", + "96 Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 \n", + "97 Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority \n", + "98 Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority \n", + "99 Virtual Machines MdSv2 Series Windows M192idms_v2 \n", + "\n", + " serviceName serviceId serviceFamily unitOfMeasure \\\n", + "0 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "1 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "2 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "3 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "4 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + ".. ... ... ... ... \n", + "95 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "96 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "97 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "98 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "99 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "\n", + " type isPrimaryMeterRegion armSkuName \\\n", + "0 Consumption True Standard_D14 \n", + "1 DevTestConsumption True Standard_D14 \n", + "2 Consumption True Standard_D64s_v5 \n", + "3 DevTestConsumption True Standard_D64s_v5 \n", + "4 DevTestConsumption True Standard_A3 \n", + ".. ... ... ... \n", + "95 Consumption True Standard_D2ds_v5 \n", + "96 DevTestConsumption True Standard_D2ds_v5 \n", + "97 Consumption True Standard_D48s_v5 \n", + "98 DevTestConsumption True Standard_D48s_v5 \n", + "99 DevTestConsumption True Standard_M192idms_v2 \n", + "\n", + " reservationTerm \n", + "0 NaN \n", + "1 NaN \n", + "2 NaN \n", + "3 NaN \n", + "4 NaN \n", + ".. ... \n", + "95 NaN \n", + "96 NaN \n", + "97 NaN \n", + "98 NaN \n", + "99 NaN \n", + "\n", + "[100 rows x 21 columns]" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dfi_normalize = pd.json_normalize(df_items)\n", + "(dfi_normalize).fillna(\"NA\")\n", + "dfi_normalize" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Understand unique Product Names from Items" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T14:27:36.362783Z", + "start_time": "2022-03-19T14:27:36.350624Z" + } + }, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['D14 Spot', 'Standard_D64s_v5 Spot', 'A3 Spot',\n", + " 'Standard_E2bds_v5 Spot', 'D2 v4 Low Priority', 'E2s v5 Spot',\n", + " 'Standard_D16s_v5', 'E16-8ads v5 Spot', 'D14 v2', 'DS14 v2', 'A2',\n", + " 'E8-2s v4 Low Priority', 'Standard_D96_v5 Low Priority',\n", + " 'F16s Spot', 'DS4 v2 Spot', 'Standard_D64ds_v5',\n", + " 'Standard_E20d_v5 Low Priority', 'Easv4 Type2',\n", + " 'Standard_DC8as_v5 Low Priority', 'E20 v3 Low Priority',\n", + " 'E20s v3 Low Priority', 'A3', 'F16 Spot', 'E32 v4 Spot',\n", + " 'E104ids v5 Low Priority', 'Standard_D4ds_v5',\n", + " 'Standard_D16ds_v5 Spot', 'HC44-32rs Spot', 'E64-16s v4 Spot',\n", + " 'D64s v4', 'E64s v4', 'E20ds v4 Low Priority', 'M416s v2 Spot',\n", + " 'E64 v4', 'E4ds v5 Low Priority', 'E4-2ds v5 Low Priority',\n", + " 'D5 v2 Spot', 'DS13 Low Priority', 'D13 Low Priority',\n", + " 'NV4as v4 Spot', 'E8-4ads v5 Low Priority', 'E48s v5 Spot',\n", + " 'M128 Low Priority', 'D16s v3 Spot', 'Standard_E96_v5',\n", + " 'E64 v3 Spot', 'E4s v5 Low Priority', 'E4-2s v5 Low Priority',\n", + " 'E48 v3 Low Priority', 'E48s v3 Low Priority', 'E16 v4 Spot',\n", + " 'E16ds v4 Spot', 'E48ds v4 Low Priority', 'D64ds v4 Low Priority',\n", + " 'E8-2ds v4 Spot', 'Standard_D2ds_v5',\n", + " 'Standard_D48s_v5 Low Priority', 'M192idms_v2'], dtype=object)" + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.unique(dfi_normalize[\"skuName\"])\n", + "#pd.Series((dfi_s[\"productName\"])).unique()\n", + "#pd.Series((dfi_normalize[\"armRegionName\"])).unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-20T03:43:35.761515Z", + "start_time": "2022-03-20T03:43:35.703678Z" + } + }, + "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", + " \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", + " \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", + " \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", + " \n", + " \n", + " \n", + "
armRegionNameproductNameskuNameretailPricecurrencyCodeserviceNameserviceFamily
0southindiaVirtual Machines D Series WindowsD14 Spot0.542506USDVirtual MachinesCompute
1southindiaVirtual Machines D Series WindowsD14 Spot0.262752USDVirtual MachinesCompute
2eastasiaVirtual Machines Dsv5 Series WindowsStandard_D64s_v5 Spot1.468006USDVirtual MachinesCompute
3eastasiaVirtual Machines Dsv5 Series WindowsStandard_D64s_v5 Spot0.865075USDVirtual MachinesCompute
4uknorthVirtual Machines A Series WindowsA3 Spot0.062988USDVirtual MachinesCompute
........................
95uaecentralVirtual Machines Ddsv5 Series WindowsStandard_D2ds_v50.272000USDVirtual MachinesCompute
96uaecentralVirtual Machines Ddsv5 Series WindowsStandard_D2ds_v50.180000USDVirtual MachinesCompute
97uksouthVirtual Machines Dsv5 Series WindowsStandard_D48s_v5 Low Priority1.949000USDVirtual MachinesCompute
98uksouthVirtual Machines Dsv5 Series WindowsStandard_D48s_v5 Low Priority0.533000USDVirtual MachinesCompute
99eastus2Virtual Machines MdSv2 Series WindowsM192idms_v232.064000USDVirtual MachinesCompute
\n", + "

100 rows × 7 columns

\n", + "
" + ], + "text/plain": [ + " armRegionName productName \\\n", + "0 southindia Virtual Machines D Series Windows \n", + "1 southindia Virtual Machines D Series Windows \n", + "2 eastasia Virtual Machines Dsv5 Series Windows \n", + "3 eastasia Virtual Machines Dsv5 Series Windows \n", + "4 uknorth Virtual Machines A Series Windows \n", + ".. ... ... \n", + "95 uaecentral Virtual Machines Ddsv5 Series Windows \n", + "96 uaecentral Virtual Machines Ddsv5 Series Windows \n", + "97 uksouth Virtual Machines Dsv5 Series Windows \n", + "98 uksouth Virtual Machines Dsv5 Series Windows \n", + "99 eastus2 Virtual Machines MdSv2 Series Windows \n", + "\n", + " skuName retailPrice currencyCode serviceName \\\n", + "0 D14 Spot 0.542506 USD Virtual Machines \n", + "1 D14 Spot 0.262752 USD Virtual Machines \n", + "2 Standard_D64s_v5 Spot 1.468006 USD Virtual Machines \n", + "3 Standard_D64s_v5 Spot 0.865075 USD Virtual Machines \n", + "4 A3 Spot 0.062988 USD Virtual Machines \n", + ".. ... ... ... ... \n", + "95 Standard_D2ds_v5 0.272000 USD Virtual Machines \n", + "96 Standard_D2ds_v5 0.180000 USD Virtual Machines \n", + "97 Standard_D48s_v5 Low Priority 1.949000 USD Virtual Machines \n", + "98 Standard_D48s_v5 Low Priority 0.533000 USD Virtual Machines \n", + "99 M192idms_v2 32.064000 USD Virtual Machines \n", + "\n", + " serviceFamily \n", + "0 Compute \n", + "1 Compute \n", + "2 Compute \n", + "3 Compute \n", + "4 Compute \n", + ".. ... \n", + "95 Compute \n", + "96 Compute \n", + "97 Compute \n", + "98 Compute \n", + "99 Compute \n", + "\n", + "[100 rows x 7 columns]" + ] + }, + "execution_count": 91, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dfi_s=dfi_normalize[[\"armRegionName\",\"productName\",\"skuName\",\"retailPrice\",\"currencyCode\",\"serviceName\",\"serviceFamily\"]]\n", + "#dfi_s=dfi_normalize[[\"armRegionName\",\"productName\",\"skuName\",\"retailPrice\"]]\n", + "dfi_s\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Group by columns ('armRegionName','productName','skuName','serviceName','serviceFamily') to get region wise Max Price and Min Price" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-20T03:44:34.280819Z", + "start_time": "2022-03-20T03:44:34.170475Z" + } + }, + "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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
maxPriceminPrice
armRegionNameproductNameskuNameserviceNameserviceFamily
australiacentralVirtual Machines Edsv4 Series WindowsE8-2ds v4 SpotVirtual MachinesCompute0.1847100.069600
australiacentral2Virtual Machines Esv5 SeriesE48s v5 SpotVirtual MachinesCompute1.4496001.449600
australiaeastVirtual Machines Esv4 Series WindowsE64-16s v4 SpotVirtual MachinesCompute2.0575300.852365
australiasoutheastVirtual Machines Eadsv5 Series WindowsE16-8ads v5 SpotVirtual MachinesCompute0.5370880.435840
Virtual Machines F Series WindowsF16 SpotVirtual MachinesCompute0.4030240.157550
brazilsouthVirtual Machines A Series BasicA2Virtual MachinesCompute0.1120000.112000
Virtual Machines MSv2 Series WindowsM416s v2 SpotVirtual MachinesCompute17.3730009.668100
canadacentralVirtual Machines D Series WindowsD13 Low PriorityVirtual MachinesCompute0.4560000.155000
Virtual Machines DS Series WindowsDS13 Low PriorityVirtual MachinesCompute0.4560000.155000
Virtual Machines Edsv4 Series WindowsE20ds v4 Low PriorityVirtual MachinesCompute1.0000000.316000
canadaeastVirtual Machines Esv5 SeriesE4-2s v5 Low PriorityVirtual MachinesCompute0.0552000.055200
E4s v5 Low PriorityVirtual MachinesCompute0.0552000.055200
centralusVirtual Machines A Series WindowsA3 SpotVirtual MachinesCompute0.0540000.030648
Virtual Machines Esv4 SeriesE8-2s v4 Low PriorityVirtual MachinesCompute0.1140000.114000
eastasiaVirtual Machines Dsv5 Series WindowsStandard_D64s_v5 SpotVirtual MachinesCompute1.4680060.865075
eastusDCasv5-series LinuxStandard_DC8as_v5 Low PriorityVirtual MachinesCompute0.1080000.108000
eastus2Virtual Machines Dsv5 Series WindowsStandard_D16s_v5Virtual MachinesCompute1.5040000.768000
Virtual Machines Eadsv5 SeriesE8-4ads v5 Low PriorityVirtual MachinesCompute0.1050000.105000
Virtual Machines MdSv2 Series WindowsM192idms_v2Virtual MachinesCompute32.06400032.064000
japaneastVirtual Machines A Series WindowsA3Virtual MachinesCompute0.4240000.324000
Virtual Machines Edsv5 SeriesE104ids v5 Low PriorityVirtual MachinesCompute1.9910001.991000
Virtual Machines Edv5 SeriesStandard_E20d_v5 Low PriorityVirtual MachinesCompute0.3480000.348000
japanwestVirtual Machines Ddsv5 Series WindowsStandard_D16ds_v5 SpotVirtual MachinesCompute0.3899390.239206
Virtual Machines Esv4 Series WindowsE64s v4Virtual MachinesCompute8.2940005.350000
koreasouthEasv4 Series Dedicated HostEasv4 Type2Virtual MachinesCompute77890.0000007.603000
Virtual Machines Dv5 Series WindowsStandard_D96_v5 Low PriorityVirtual MachinesCompute3.8860001.060000
northcentralusVirtual Machines DSv2 promo SeriesDS14 v2Virtual MachinesCompute1.4820001.482000
Virtual Machines Dv2 promo SeriesD14 v2Virtual MachinesCompute1.4820001.482000
northeuropeVirtual Machines Esv5 SeriesE2s v5 SpotVirtual MachinesCompute0.0365470.036547
Virtual Machines Ev5 SeriesStandard_E96_v5Virtual MachinesCompute67588.0000006.768000
southafricawestVirtual Machines ESv3 SeriesE20s v3 Low PriorityVirtual MachinesCompute0.4200000.420000
Virtual Machines Edsv4 Series WindowsE16ds v4 SpotVirtual MachinesCompute0.5384740.196983
Virtual Machines Ev3 SeriesE20 v3 Low PriorityVirtual MachinesCompute0.4200000.420000
southcentralusVirtual Machines Ev4 SeriesE64 v4Virtual MachinesCompute48318.0000004.838000
southeastasiaVirtual Machines HCS SeriesHC44-32rs SpotVirtual MachinesCompute0.4118000.411800
southindiaVirtual Machines D Series WindowsD14 SpotVirtual MachinesCompute0.5425060.262752
Virtual Machines Dv2 SeriesD5 v2 SpotVirtual MachinesCompute0.1814400.181440
Virtual Machines MS Series WindowsM128 Low PriorityVirtual MachinesCompute10.4400004.041000
switzerlandnorthVirtual Machines Ddsv5 Series WindowsStandard_D4ds_v5Virtual MachinesCompute0.4830000.150000
uaecentralVirtual Machines Ddsv5 Series WindowsStandard_D2ds_v5Virtual MachinesCompute0.2720000.180000
Virtual Machines Ev4 SeriesE16 v4 SpotVirtual MachinesCompute0.1572000.157200
E32 v4 SpotVirtual MachinesCompute0.3145000.314500
uaenorthVirtual Machines DSv3 Series WindowsD16s v3 SpotVirtual MachinesCompute0.3386910.129024
uknorthVirtual Machines A Series WindowsA3 SpotVirtual MachinesCompute0.1900000.062988
Virtual Machines Ev3 Series WindowsE64 v3 SpotVirtual MachinesCompute3.2244001.022888
uksouthVirtual Machines Dsv5 Series WindowsStandard_D48s_v5 Low PriorityVirtual MachinesCompute1.9490000.533000
usgovarizonaVirtual Machines Dsv4 SeriesD64s v4Virtual MachinesCompute38667.0000003.872000
Virtual Machines NVasv4 SeriesNV4as v4 SpotVirtual MachinesCompute0.0391100.039110
usgovtexasVirtual Machines FS Series WindowsF16s SpotVirtual MachinesCompute0.3415100.341510
westcentralusVirtual Machines Edsv5 Series WindowsE4-2ds v5 Low PriorityVirtual MachinesCompute0.2120000.069100
E4ds v5 Low PriorityVirtual MachinesCompute0.2120000.069100
westeuropeVirtual Machines FS Series WindowsF16s SpotVirtual MachinesCompute0.5713080.210434
westindiaVirtual Machines DSv2 SeriesDS4 v2 SpotVirtual MachinesCompute0.0907200.090720
Virtual Machines Dv4 SeriesD2 v4 Low PriorityVirtual MachinesCompute0.0236000.023600
Virtual Machines Edsv4 Series WindowsE48ds v4 Low PriorityVirtual MachinesCompute2.5510000.834000
westusVirtual Machines Ebdsv5 SeriesStandard_E2bds_v5 SpotVirtual MachinesCompute0.0756000.075600
westus2Virtual Machines Ddsv4 SeriesD64ds v4 Low PriorityVirtual MachinesCompute0.7230000.723000
Virtual Machines Ddsv5 SeriesStandard_D64ds_v5Virtual MachinesCompute36111.0000003.616000
Virtual Machines ESv3 Series WindowsE48s v3 Low PriorityVirtual MachinesCompute2.0930000.605000
Virtual Machines Ev3 Series WindowsE48 v3 Low PriorityVirtual MachinesCompute2.0930000.605000
\n", + "
" + ], + "text/plain": [ + " maxPrice \\\n", + "armRegionName productName skuName serviceName serviceFamily \n", + "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute 0.184710 \n", + "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute 1.449600 \n", + "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute 2.057530 \n", + "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute 0.537088 \n", + " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute 0.403024 \n", + "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute 0.112000 \n", + " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute 17.373000 \n", + "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute 0.456000 \n", + " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute 0.456000 \n", + " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute 1.000000 \n", + "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute 0.055200 \n", + " E4s v5 Low Priority Virtual Machines Compute 0.055200 \n", + "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.054000 \n", + " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute 0.114000 \n", + "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute 1.468006 \n", + "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute 0.108000 \n", + "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute 1.504000 \n", + " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute 0.105000 \n", + " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute 32.064000 \n", + "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute 0.424000 \n", + " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute 1.991000 \n", + " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute 0.348000 \n", + "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute 0.389939 \n", + " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute 8.294000 \n", + "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 77890.000000 \n", + " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute 3.886000 \n", + "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute 1.482000 \n", + " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute 1.482000 \n", + "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute 0.036547 \n", + " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 67588.000000 \n", + "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute 0.420000 \n", + " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute 0.538474 \n", + " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute 0.420000 \n", + "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 48318.000000 \n", + "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute 0.411800 \n", + "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute 0.542506 \n", + " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute 0.181440 \n", + " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute 10.440000 \n", + "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute 0.483000 \n", + "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute 0.272000 \n", + " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute 0.157200 \n", + " E32 v4 Spot Virtual Machines Compute 0.314500 \n", + "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute 0.338691 \n", + "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.190000 \n", + " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute 3.224400 \n", + "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute 1.949000 \n", + "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 38667.000000 \n", + " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute 0.039110 \n", + "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.341510 \n", + "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute 0.212000 \n", + " E4ds v5 Low Priority Virtual Machines Compute 0.212000 \n", + "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.571308 \n", + "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute 0.090720 \n", + " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute 0.023600 \n", + " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute 2.551000 \n", + "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute 0.075600 \n", + "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute 0.723000 \n", + " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute 36111.000000 \n", + " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute 2.093000 \n", + " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute 2.093000 \n", + "\n", + " minPrice \n", + "armRegionName productName skuName serviceName serviceFamily \n", + "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute 0.069600 \n", + "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute 1.449600 \n", + "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute 0.852365 \n", + "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute 0.435840 \n", + " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute 0.157550 \n", + "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute 0.112000 \n", + " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute 9.668100 \n", + "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute 0.155000 \n", + " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute 0.155000 \n", + " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute 0.316000 \n", + "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute 0.055200 \n", + " E4s v5 Low Priority Virtual Machines Compute 0.055200 \n", + "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.030648 \n", + " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute 0.114000 \n", + "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute 0.865075 \n", + "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute 0.108000 \n", + "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute 0.768000 \n", + " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute 0.105000 \n", + " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute 32.064000 \n", + "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute 0.324000 \n", + " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute 1.991000 \n", + " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute 0.348000 \n", + "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute 0.239206 \n", + " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute 5.350000 \n", + "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 7.603000 \n", + " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute 1.060000 \n", + "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute 1.482000 \n", + " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute 1.482000 \n", + "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute 0.036547 \n", + " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 6.768000 \n", + "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute 0.420000 \n", + " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute 0.196983 \n", + " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute 0.420000 \n", + "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 4.838000 \n", + "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute 0.411800 \n", + "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute 0.262752 \n", + " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute 0.181440 \n", + " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute 4.041000 \n", + "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute 0.150000 \n", + "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute 0.180000 \n", + " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute 0.157200 \n", + " E32 v4 Spot Virtual Machines Compute 0.314500 \n", + "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute 0.129024 \n", + "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.062988 \n", + " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute 1.022888 \n", + "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute 0.533000 \n", + "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 3.872000 \n", + " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute 0.039110 \n", + "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.341510 \n", + "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute 0.069100 \n", + " E4ds v5 Low Priority Virtual Machines Compute 0.069100 \n", + "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.210434 \n", + "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute 0.090720 \n", + " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute 0.023600 \n", + " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute 0.834000 \n", + "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute 0.075600 \n", + "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute 0.723000 \n", + " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute 3.616000 \n", + " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute 0.605000 \n", + " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute 0.605000 " + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#data = dfi_s.groupby('productName').transform(lambda x: (x - x.min()) / x.max()- x.min())\n", + "#grouper = dfi_s.groupby(['armRegionName','productName','skuName'])['retailPrice'].agg(['max','min'])\n", + "result = dfi_s.groupby(['armRegionName','productName','skuName','serviceName','serviceFamily']).agg(\n", + " maxPrice=('retailPrice','max'),minPrice=('retailPrice','min'))\n", + "\n", + "result\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Data analysis to understand service prices above 5000 USD" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-19T07:27:10.782017Z", + "start_time": "2022-03-19T07:27:10.743135Z" + } + }, + "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", + " \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", + " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
armRegionNameproductNameretailPricecurrencyCodeserviceNameserviceFamily
22westus2Virtual Machines Ddsv5 Series36111.0USDVirtual MachinesCompute
23westus2Virtual Machines Ddsv5 Series18689.0USDVirtual MachinesCompute
28koreasouthEasv4 Series Dedicated Host77890.0USDVirtual MachinesCompute
29koreasouthEasv4 Series Dedicated Host39231.0USDVirtual MachinesCompute
47usgovarizonaVirtual Machines Dsv4 Series38667.0USDVirtual MachinesCompute
48usgovarizonaVirtual Machines Dsv4 Series20012.0USDVirtual MachinesCompute
56southcentralusVirtual Machines Ev4 Series48318.0USDVirtual MachinesCompute
57southcentralusVirtual Machines Ev4 Series25007.0USDVirtual MachinesCompute
74northeuropeVirtual Machines Ev5 Series67588.0USDVirtual MachinesCompute
76northeuropeVirtual Machines Ev5 Series34980.0USDVirtual MachinesCompute
\n", + "
" + ], + "text/plain": [ + " armRegionName productName retailPrice currencyCode \\\n", + "22 westus2 Virtual Machines Ddsv5 Series 36111.0 USD \n", + "23 westus2 Virtual Machines Ddsv5 Series 18689.0 USD \n", + "28 koreasouth Easv4 Series Dedicated Host 77890.0 USD \n", + "29 koreasouth Easv4 Series Dedicated Host 39231.0 USD \n", + "47 usgovarizona Virtual Machines Dsv4 Series 38667.0 USD \n", + "48 usgovarizona Virtual Machines Dsv4 Series 20012.0 USD \n", + "56 southcentralus Virtual Machines Ev4 Series 48318.0 USD \n", + "57 southcentralus Virtual Machines Ev4 Series 25007.0 USD \n", + "74 northeurope Virtual Machines Ev5 Series 67588.0 USD \n", + "76 northeurope Virtual Machines Ev5 Series 34980.0 USD \n", + "\n", + " serviceName serviceFamily \n", + "22 Virtual Machines Compute \n", + "23 Virtual Machines Compute \n", + "28 Virtual Machines Compute \n", + "29 Virtual Machines Compute \n", + "47 Virtual Machines Compute \n", + "48 Virtual Machines Compute \n", + "56 Virtual Machines Compute \n", + "57 Virtual Machines Compute \n", + "74 Virtual Machines Compute \n", + "76 Virtual Machines Compute " + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "high_price= dfi_s[dfi_s[\"retailPrice\"] > 5000 ]\n", + "high_price" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.8" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": true, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 58ef70ff6a9e5ddc8304f9e3221c4c1d87f9e06b Mon Sep 17 00:00:00 2001 From: Sumedh Patil Date: Tue, 29 Mar 2022 19:56:40 +0530 Subject: [PATCH 2/6] fifth commit --- .../cloud_price_analysis_azure.ipynb | 3106 +++++++++++++---- 1 file changed, 2515 insertions(+), 591 deletions(-) diff --git a/notebooks/experimental/cloud_price_analysis_azure.ipynb b/notebooks/experimental/cloud_price_analysis_azure.ipynb index 3e02236..d2d7cf1 100644 --- a/notebooks/experimental/cloud_price_analysis_azure.ipynb +++ b/notebooks/experimental/cloud_price_analysis_azure.ipynb @@ -2,104 +2,69 @@ "cells": [ { "cell_type": "markdown", + "id": "2782d5c7", "metadata": {}, "source": [ - "### Analysis of Azure Pricing details, \n", - "#### source JSON file https://prices.azure.com/api/retail/prices?api-version=2021-10-01-preview&meterRegion=%E2%80%99primary%E2%80%99" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": { - "ExecuteTime": { - "end_time": "2022-03-19T07:05:20.304539Z", - "start_time": "2022-03-19T07:05:06.400775Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting matplotlib\n", - " Downloading matplotlib-3.3.4-cp36-cp36m-manylinux1_x86_64.whl (11.5 MB)\n", - "\u001b[K |████████████████████████████████| 11.5 MB 7.5 MB/s eta 0:00:01 |████████████████▋ | 6.0 MB 7.5 MB/s eta 0:00:01\n", - "\u001b[?25hRequirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /opt/app-root/lib/python3.6/site-packages (from matplotlib) (2.4.7)\n", - "Requirement already satisfied: numpy>=1.15 in /opt/app-root/lib/python3.6/site-packages (from matplotlib) (1.19.4)\n", - "Requirement already satisfied: python-dateutil>=2.1 in /opt/app-root/lib/python3.6/site-packages (from matplotlib) (2.8.1)\n", - "Collecting cycler>=0.10\n", - " Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)\n", - "Collecting kiwisolver>=1.0.1\n", - " Downloading kiwisolver-1.3.1-cp36-cp36m-manylinux1_x86_64.whl (1.1 MB)\n", - "\u001b[K |████████████████████████████████| 1.1 MB 31.8 MB/s eta 0:00:01\n", - "\u001b[?25hCollecting pillow>=6.2.0\n", - " Downloading Pillow-8.4.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\n", - "\u001b[K |████████████████████████████████| 3.1 MB 32.0 MB/s eta 0:00:01\n", - "\u001b[?25hRequirement already satisfied: six>=1.5 in /opt/app-root/lib/python3.6/site-packages (from python-dateutil>=2.1->matplotlib) (1.15.0)\n", - "Installing collected packages: pillow, kiwisolver, cycler, matplotlib\n", - "Successfully installed cycler-0.11.0 kiwisolver-1.3.1 matplotlib-3.3.4 pillow-8.4.0\n", - "\u001b[33mWARNING: You are using pip version 20.3.1; however, version 21.3.1 is available.\n", - "You should consider upgrading via the '/opt/app-root/bin/python3.6 -m pip install --upgrade pip' command.\u001b[0m\n", - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], - "source": [ - "pip install matplotlib" + "### Analysis of Azure Pricing details \n", + "\n", + "This notebook will analyze service name = 'Virtual Machines'\n", + "source JSON file https://prices.azure.com/api/retail/prices?api-version=2021-10-01-preview&meterRegion=%E2%80%99primary%E2%80%99" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 61, + "id": "bdbaddda", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T07:05:45.713310Z", - "start_time": "2022-03-19T07:05:45.050837Z" + "end_time": "2022-03-29T14:19:38.686518Z", + "start_time": "2022-03-29T14:19:38.679959Z" } }, "outputs": [], "source": [ - "import json as json\n", + "# import json as json\n", "import pandas as pd\n", - "import matplotlib.pyplot as plt\n", - "from collections import defaultdict\n", - "import requests\n", - "\n" + "\n", + "# from collections import defaultdict\n", + "import requests" ] }, { "cell_type": "markdown", + "id": "523468ad", "metadata": {}, "source": [ - "#### Access the API end point for 'Vitual Machine' and create JSON file ../data/raw/" + "#### Access the API end point for 'Vitual Machine' and store JSON file at location ../data/raw/" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 40, + "id": "955af161", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T07:05:50.617950Z", - "start_time": "2022-03-19T07:05:49.822359Z" + "end_time": "2022-03-29T14:09:28.074579Z", + "start_time": "2022-03-29T14:09:26.912800Z" } }, "outputs": [], "source": [ - "r = requests.get('https://prices.azure.com/api/retail/prices?$filter=serviceName eq \\'Virtual Machines\\'')\n", - "with open('../../data/raw/azure_vm.json','w') as fd:\n", - " fd.write(r.text)\n", - "\n", - "\n" + "r = requests.get(\n", + " \"https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines'\"\n", + ")\n", + "with open(\"../../data/raw/azure_vm.json\", \"w\") as fd:\n", + " fd.write(r.text)" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 41, + "id": "1fccfe1c", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T07:06:40.226142Z", - "start_time": "2022-03-19T07:06:40.118719Z" + "end_time": "2022-03-29T14:09:30.701510Z", + "start_time": "2022-03-29T14:09:30.632726Z" } }, "outputs": [ @@ -205,7 +170,7 @@ "4 https://prices.azure.com:443/api/retail/prices... 100 " ] }, - "execution_count": 6, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -217,6 +182,7 @@ }, { "cell_type": "markdown", + "id": "6c5e9c5b", "metadata": {}, "source": [ "#### Understand shape of data" @@ -224,11 +190,12 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 42, + "id": "36d5f71e", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T07:06:49.822336Z", - "start_time": "2022-03-19T07:06:49.765094Z" + "end_time": "2022-03-29T14:09:34.211885Z", + "start_time": "2022-03-29T14:09:34.159463Z" } }, "outputs": [ @@ -338,7 +305,7 @@ "max 100.0" ] }, - "execution_count": 7, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -349,59 +316,46 @@ "print(\"Is null?\\n\\n\", df.isnull().sum())\n", "print(\"\\n\\n\")\n", "print(\"Columnwise Datatype\\n\\n\", df.dtypes)\n", - "df.describe()\n" + "df.describe()" ] }, { - "cell_type": "code", - "execution_count": 33, + "cell_type": "markdown", + "id": "c224e305", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T14:03:07.786946Z", - "start_time": "2022-03-19T14:03:07.715791Z" + "end_time": "2022-03-22T05:57:27.176179Z", + "start_time": "2022-03-22T05:57:27.170815Z" } }, - "outputs": [], "source": [ "#### Split data into multiple components, create series out of dataframes, List \"Items\" is carrying actual data items" ] }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 43, + "id": "7b2f4bb7", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T14:16:27.143679Z", - "start_time": "2022-03-19T14:16:27.129724Z" + "end_time": "2022-03-29T14:09:38.564518Z", + "start_time": "2022-03-29T14:09:38.555223Z" } }, - "outputs": [ - { - "data": { - "text/plain": [ - "100" - ] - }, - "execution_count": 44, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "df_items = df[\"Items\"]\n", - "df_items = df_items.fillna(\"NA\")\n", - "type(df_items)\n", - "dfi_l=len(df_items)\n", - "dfi_l\n" + "df_items = df_items.fillna(\"NA\")" ] }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 51, + "id": "b0f64c41", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T14:17:03.108462Z", - "start_time": "2022-03-19T14:17:03.081948Z" + "end_time": "2022-03-29T14:12:09.990992Z", + "start_time": "2022-03-29T14:12:09.963748Z" } }, "outputs": [ @@ -422,30 +376,57 @@ "Name: Items, Length: 100, dtype: object" ] }, - "execution_count": 45, + "execution_count": 51, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "#print dict\n", "df_items" ] }, { "cell_type": "markdown", + "id": "3a5b47be", "metadata": {}, "source": [ - "#### Normalize data into tabular format" + "#### Some times JSON file is missing reservationTerm or sometimes carry the values are 1 Year, 3 Years or onDemand\n", + "Below piece of code will determine if reservationTime key exists if not insert key with default value as onDemand" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "id": "8806807a", + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-29T14:09:43.697103Z", + "start_time": "2022-03-29T14:09:42.059624Z" + }, + "code_folding": [] + }, + "outputs": [], + "source": [ + "df_items_2 = pd.DataFrame()\n", + "\n", + "for data in df_items:\n", + " df_dictionary = pd.DataFrame([data])\n", + " if \"reservationTerm\" in data:\n", + " df_items_2 = pd.concat([df_items_2, df_dictionary], ignore_index=True)\n", + " else:\n", + " data[\"reservationTerm\"] = \"OnDemand\"\n", + " # df_dictionary = pd.DataFrame([data])\n", + " df_items_2 = pd.concat([df_items_2, df_dictionary], ignore_index=True)" ] }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 52, + "id": "b33a6daf", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T14:17:20.627698Z", - "start_time": "2022-03-19T14:17:20.480034Z" + "end_time": "2022-03-29T14:12:51.483718Z", + "start_time": "2022-03-29T14:12:51.344254Z" } }, "outputs": [ @@ -477,9 +458,9 @@ " armRegionName\n", " location\n", " effectiveStartDate\n", + " effectiveEndDate\n", " meterId\n", " meterName\n", - " productId\n", " ...\n", " productName\n", " skuName\n", @@ -498,14 +479,14 @@ " 0\n", " USD\n", " 0.0\n", - " 0.542506\n", - " 0.542506\n", + " 0.262752\n", + " 0.262752\n", " southindia\n", " IN South\n", " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", " 000009d0-057f-5f2b-b7e9-9e26add324a8\n", " D14/DS14 Spot\n", - " DZH318Z0BPVW\n", " ...\n", " Virtual Machines D Series Windows\n", " D14 Spot\n", @@ -513,23 +494,23 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " Consumption\n", + " DevTestConsumption\n", " True\n", " Standard_D14\n", - " NaN\n", + " NA\n", " \n", " \n", " 1\n", " USD\n", " 0.0\n", - " 0.262752\n", - " 0.262752\n", + " 0.542506\n", + " 0.542506\n", " southindia\n", " IN South\n", " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", " 000009d0-057f-5f2b-b7e9-9e26add324a8\n", " D14/DS14 Spot\n", - " DZH318Z0BPVW\n", " ...\n", " Virtual Machines D Series Windows\n", " D14 Spot\n", @@ -537,23 +518,23 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " DevTestConsumption\n", + " Consumption\n", " True\n", " Standard_D14\n", - " NaN\n", + " NA\n", " \n", " \n", " 2\n", " USD\n", " 0.0\n", - " 1.468006\n", - " 1.468006\n", + " 0.865075\n", + " 0.865075\n", " eastasia\n", " AP East\n", " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", " 00014e7d-fff9-54dd-962e-4e992887ad3c\n", " D64s v5 Spot\n", - " DZH318Z08M9T\n", " ...\n", " Virtual Machines Dsv5 Series Windows\n", " Standard_D64s_v5 Spot\n", @@ -561,23 +542,23 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " Consumption\n", + " DevTestConsumption\n", " True\n", " Standard_D64s_v5\n", - " NaN\n", + " NA\n", " \n", " \n", " 3\n", " USD\n", " 0.0\n", - " 0.865075\n", - " 0.865075\n", + " 1.468006\n", + " 1.468006\n", " eastasia\n", " AP East\n", " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", " 00014e7d-fff9-54dd-962e-4e992887ad3c\n", " D64s v5 Spot\n", - " DZH318Z08M9T\n", " ...\n", " Virtual Machines Dsv5 Series Windows\n", " Standard_D64s_v5 Spot\n", @@ -585,23 +566,23 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " DevTestConsumption\n", + " Consumption\n", " True\n", " Standard_D64s_v5\n", - " NaN\n", + " NA\n", " \n", " \n", " 4\n", " USD\n", " 0.0\n", - " 0.062988\n", - " 0.062988\n", + " 0.190000\n", + " 0.190000\n", " uknorth\n", " UK North\n", " 2019-10-16T00:00:00Z\n", + " NA\n", " 0001e46a-9285-5fa8-b48a-240e307a24f7\n", " A3 Spot\n", - " DZH318Z0BPVJ\n", " ...\n", " Virtual Machines A Series Windows\n", " A3 Spot\n", @@ -609,10 +590,10 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " DevTestConsumption\n", + " Consumption\n", " True\n", " Standard_A3\n", - " NaN\n", + " NA\n", " \n", " \n", " ...\n", @@ -642,14 +623,14 @@ " 95\n", " USD\n", " 0.0\n", - " 0.272000\n", - " 0.272000\n", + " 0.180000\n", + " 0.180000\n", " uaecentral\n", " AE Central\n", " 2021-11-01T00:00:00Z\n", + " NA\n", " 001fa4dd-bbe2-5502-b172-8a1af70ea8b8\n", " D2ds v5\n", - " DZH318Z08MC5\n", " ...\n", " Virtual Machines Ddsv5 Series Windows\n", " Standard_D2ds_v5\n", @@ -657,23 +638,23 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " Consumption\n", + " DevTestConsumption\n", " True\n", " Standard_D2ds_v5\n", - " NaN\n", + " NA\n", " \n", " \n", " 96\n", " USD\n", " 0.0\n", - " 0.180000\n", - " 0.180000\n", + " 0.272000\n", + " 0.272000\n", " uaecentral\n", " AE Central\n", " 2021-11-01T00:00:00Z\n", + " NA\n", " 001fa4dd-bbe2-5502-b172-8a1af70ea8b8\n", " D2ds v5\n", - " DZH318Z08MC5\n", " ...\n", " Virtual Machines Ddsv5 Series Windows\n", " Standard_D2ds_v5\n", @@ -681,10 +662,10 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " DevTestConsumption\n", + " Consumption\n", " True\n", " Standard_D2ds_v5\n", - " NaN\n", + " NA\n", " \n", " \n", " 97\n", @@ -695,9 +676,9 @@ " uksouth\n", " UK South\n", " 2021-11-01T00:00:00Z\n", + " NA\n", " 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3\n", " D48s v5 Low Priority\n", - " DZH318Z08M9T\n", " ...\n", " Virtual Machines Dsv5 Series Windows\n", " Standard_D48s_v5 Low Priority\n", @@ -708,7 +689,7 @@ " Consumption\n", " True\n", " Standard_D48s_v5\n", - " NaN\n", + " NA\n", " \n", " \n", " 98\n", @@ -719,9 +700,9 @@ " uksouth\n", " UK South\n", " 2021-11-01T00:00:00Z\n", + " NA\n", " 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3\n", " D48s v5 Low Priority\n", - " DZH318Z08M9T\n", " ...\n", " Virtual Machines Dsv5 Series Windows\n", " Standard_D48s_v5 Low Priority\n", @@ -732,20 +713,20 @@ " DevTestConsumption\n", " True\n", " Standard_D48s_v5\n", - " NaN\n", + " NA\n", " \n", " \n", " 99\n", " USD\n", " 0.0\n", - " 32.064000\n", - " 32.064000\n", + " 40.896000\n", + " 40.896000\n", " eastus2\n", " US East 2\n", " 2021-01-01T00:00:00Z\n", + " NA\n", " 00204db1-b465-59e2-baa7-bc6b848c5b78\n", " M192idms_v2\n", - " DZH318Z08LV0\n", " ...\n", " Virtual Machines MdSv2 Series Windows\n", " M192idms_v2\n", @@ -753,55 +734,55 @@ " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " DevTestConsumption\n", + " Consumption\n", " True\n", " Standard_M192idms_v2\n", - " NaN\n", + " NA\n", " \n", " \n", "\n", - "

100 rows × 21 columns

\n", + "

100 rows × 22 columns

\n", "" ], "text/plain": [ " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", - "0 USD 0.0 0.542506 0.542506 southindia \n", - "1 USD 0.0 0.262752 0.262752 southindia \n", - "2 USD 0.0 1.468006 1.468006 eastasia \n", - "3 USD 0.0 0.865075 0.865075 eastasia \n", - "4 USD 0.0 0.062988 0.062988 uknorth \n", + "0 USD 0.0 0.262752 0.262752 southindia \n", + "1 USD 0.0 0.542506 0.542506 southindia \n", + "2 USD 0.0 0.865075 0.865075 eastasia \n", + "3 USD 0.0 1.468006 1.468006 eastasia \n", + "4 USD 0.0 0.190000 0.190000 uknorth \n", ".. ... ... ... ... ... \n", - "95 USD 0.0 0.272000 0.272000 uaecentral \n", - "96 USD 0.0 0.180000 0.180000 uaecentral \n", + "95 USD 0.0 0.180000 0.180000 uaecentral \n", + "96 USD 0.0 0.272000 0.272000 uaecentral \n", "97 USD 0.0 1.949000 1.949000 uksouth \n", "98 USD 0.0 0.533000 0.533000 uksouth \n", - "99 USD 0.0 32.064000 32.064000 eastus2 \n", + "99 USD 0.0 40.896000 40.896000 eastus2 \n", "\n", - " location effectiveStartDate meterId \\\n", - "0 IN South 2022-03-01T00:00:00Z 000009d0-057f-5f2b-b7e9-9e26add324a8 \n", - "1 IN South 2022-03-01T00:00:00Z 000009d0-057f-5f2b-b7e9-9e26add324a8 \n", - "2 AP East 2022-03-01T00:00:00Z 00014e7d-fff9-54dd-962e-4e992887ad3c \n", - "3 AP East 2022-03-01T00:00:00Z 00014e7d-fff9-54dd-962e-4e992887ad3c \n", - "4 UK North 2019-10-16T00:00:00Z 0001e46a-9285-5fa8-b48a-240e307a24f7 \n", - ".. ... ... ... \n", - "95 AE Central 2021-11-01T00:00:00Z 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 \n", - "96 AE Central 2021-11-01T00:00:00Z 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 \n", - "97 UK South 2021-11-01T00:00:00Z 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 \n", - "98 UK South 2021-11-01T00:00:00Z 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 \n", - "99 US East 2 2021-01-01T00:00:00Z 00204db1-b465-59e2-baa7-bc6b848c5b78 \n", + " location effectiveStartDate effectiveEndDate \\\n", + "0 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "1 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "2 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "3 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "4 UK North 2019-10-16T00:00:00Z NA \n", + ".. ... ... ... \n", + "95 AE Central 2021-11-01T00:00:00Z NA \n", + "96 AE Central 2021-11-01T00:00:00Z NA \n", + "97 UK South 2021-11-01T00:00:00Z NA \n", + "98 UK South 2021-11-01T00:00:00Z NA \n", + "99 US East 2 2021-01-01T00:00:00Z NA \n", "\n", - " meterName productId ... \\\n", - "0 D14/DS14 Spot DZH318Z0BPVW ... \n", - "1 D14/DS14 Spot DZH318Z0BPVW ... \n", - "2 D64s v5 Spot DZH318Z08M9T ... \n", - "3 D64s v5 Spot DZH318Z08M9T ... \n", - "4 A3 Spot DZH318Z0BPVJ ... \n", - ".. ... ... ... \n", - "95 D2ds v5 DZH318Z08MC5 ... \n", - "96 D2ds v5 DZH318Z08MC5 ... \n", - "97 D48s v5 Low Priority DZH318Z08M9T ... \n", - "98 D48s v5 Low Priority DZH318Z08M9T ... \n", - "99 M192idms_v2 DZH318Z08LV0 ... \n", + " meterId meterName ... \\\n", + "0 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", + "1 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", + "2 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", + "3 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", + "4 0001e46a-9285-5fa8-b48a-240e307a24f7 A3 Spot ... \n", + ".. ... ... ... \n", + "95 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 D2ds v5 ... \n", + "96 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 D2ds v5 ... \n", + "97 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 D48s v5 Low Priority ... \n", + "98 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 D48s v5 Low Priority ... \n", + "99 00204db1-b465-59e2-baa7-bc6b848c5b78 M192idms_v2 ... \n", "\n", " productName skuName \\\n", "0 Virtual Machines D Series Windows D14 Spot \n", @@ -830,105 +811,502 @@ "99 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", "\n", " type isPrimaryMeterRegion armSkuName \\\n", - "0 Consumption True Standard_D14 \n", - "1 DevTestConsumption True Standard_D14 \n", - "2 Consumption True Standard_D64s_v5 \n", - "3 DevTestConsumption True Standard_D64s_v5 \n", - "4 DevTestConsumption True Standard_A3 \n", + "0 DevTestConsumption True Standard_D14 \n", + "1 Consumption True Standard_D14 \n", + "2 DevTestConsumption True Standard_D64s_v5 \n", + "3 Consumption True Standard_D64s_v5 \n", + "4 Consumption True Standard_A3 \n", ".. ... ... ... \n", - "95 Consumption True Standard_D2ds_v5 \n", - "96 DevTestConsumption True Standard_D2ds_v5 \n", + "95 DevTestConsumption True Standard_D2ds_v5 \n", + "96 Consumption True Standard_D2ds_v5 \n", "97 Consumption True Standard_D48s_v5 \n", "98 DevTestConsumption True Standard_D48s_v5 \n", - "99 DevTestConsumption True Standard_M192idms_v2 \n", + "99 Consumption True Standard_M192idms_v2 \n", "\n", - " reservationTerm \n", - "0 NaN \n", - "1 NaN \n", - "2 NaN \n", - "3 NaN \n", - "4 NaN \n", - ".. ... \n", - "95 NaN \n", - "96 NaN \n", - "97 NaN \n", - "98 NaN \n", - "99 NaN \n", + " reservationTerm \n", + "0 NA \n", + "1 NA \n", + "2 NA \n", + "3 NA \n", + "4 NA \n", + ".. ... \n", + "95 NA \n", + "96 NA \n", + "97 NA \n", + "98 NA \n", + "99 NA \n", "\n", - "[100 rows x 21 columns]" + "[100 rows x 22 columns]" ] }, - "execution_count": 46, + "execution_count": 52, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "dfi_normalize = pd.json_normalize(df_items)\n", - "(dfi_normalize).fillna(\"NA\")\n", - "dfi_normalize" + "df_items_2 = df_items_2.fillna(\"NA\")\n", + "df_items_2" ] }, { "cell_type": "markdown", + "id": "f61b85ed", "metadata": {}, "source": [ - "#### Understand unique Product Names from Items" + "#### Understand unique type, Typical values are Consumption and Reservation" ] }, { "cell_type": "code", "execution_count": 53, + "id": "6b593eb3", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T14:27:36.362783Z", - "start_time": "2022-03-19T14:27:36.350624Z" + "end_time": "2022-03-29T14:12:59.466280Z", + "start_time": "2022-03-29T14:12:59.456496Z" } }, "outputs": [ { - "data": { - "text/plain": [ - "array(['D14 Spot', 'Standard_D64s_v5 Spot', 'A3 Spot',\n", - " 'Standard_E2bds_v5 Spot', 'D2 v4 Low Priority', 'E2s v5 Spot',\n", - " 'Standard_D16s_v5', 'E16-8ads v5 Spot', 'D14 v2', 'DS14 v2', 'A2',\n", - " 'E8-2s v4 Low Priority', 'Standard_D96_v5 Low Priority',\n", - " 'F16s Spot', 'DS4 v2 Spot', 'Standard_D64ds_v5',\n", - " 'Standard_E20d_v5 Low Priority', 'Easv4 Type2',\n", - " 'Standard_DC8as_v5 Low Priority', 'E20 v3 Low Priority',\n", - " 'E20s v3 Low Priority', 'A3', 'F16 Spot', 'E32 v4 Spot',\n", - " 'E104ids v5 Low Priority', 'Standard_D4ds_v5',\n", - " 'Standard_D16ds_v5 Spot', 'HC44-32rs Spot', 'E64-16s v4 Spot',\n", - " 'D64s v4', 'E64s v4', 'E20ds v4 Low Priority', 'M416s v2 Spot',\n", - " 'E64 v4', 'E4ds v5 Low Priority', 'E4-2ds v5 Low Priority',\n", - " 'D5 v2 Spot', 'DS13 Low Priority', 'D13 Low Priority',\n", - " 'NV4as v4 Spot', 'E8-4ads v5 Low Priority', 'E48s v5 Spot',\n", - " 'M128 Low Priority', 'D16s v3 Spot', 'Standard_E96_v5',\n", - " 'E64 v3 Spot', 'E4s v5 Low Priority', 'E4-2s v5 Low Priority',\n", - " 'E48 v3 Low Priority', 'E48s v3 Low Priority', 'E16 v4 Spot',\n", - " 'E16ds v4 Spot', 'E48ds v4 Low Priority', 'D64ds v4 Low Priority',\n", - " 'E8-2ds v4 Spot', 'Standard_D2ds_v5',\n", - " 'Standard_D48s_v5 Low Priority', 'M192idms_v2'], dtype=object)" - ] - }, - "execution_count": 53, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "['DevTestConsumption' 'Consumption' 'Reservation']\n" + ] + } + ], + "source": [ + "print(pd.unique(df_items_2[\"type\"]))" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "id": "bb957671", + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-29T14:13:01.864134Z", + "start_time": "2022-03-29T14:13:01.854114Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['NA' '1 Year' '3 Years']\n" + ] + } + ], + "source": [ + "print(pd.unique(df_items_2[\"reservationTerm\"]))" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "id": "b7f0481c", + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-29T14:13:05.125246Z", + "start_time": "2022-03-29T14:13:05.029425Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", + "1 USD 0.0 0.542506 0.542506 southindia \n", + "3 USD 0.0 1.468006 1.468006 eastasia \n", + "4 USD 0.0 0.190000 0.190000 uknorth \n", + "6 USD 0.0 0.075600 0.075600 westus \n", + "7 USD 0.0 0.023600 0.023600 westindia \n", + "8 USD 0.0 0.036547 0.036547 northeurope \n", + "9 USD 0.0 1.504000 1.504000 eastus2 \n", + "12 USD 0.0 0.537088 0.537088 australiasoutheast \n", + "13 USD 0.0 1.482000 1.482000 northcentralus \n", + "14 USD 0.0 1.482000 1.482000 northcentralus \n", + "15 USD 0.0 0.112000 0.112000 brazilsouth \n", + "16 USD 0.0 0.114000 0.114000 centralus \n", + "17 USD 0.0 3.886000 3.886000 koreasouth \n", + "20 USD 0.0 0.571308 0.571308 westeurope \n", + "21 USD 0.0 0.090720 0.090720 westindia \n", + "23 USD 0.0 3.616000 3.616000 westus2 \n", + "25 USD 0.0 0.348000 0.348000 japaneast \n", + "26 USD 0.0 0.341510 0.341510 usgovtexas \n", + "27 USD 0.0 7.603000 7.603000 koreasouth \n", + "30 USD 0.0 0.108000 0.108000 eastus \n", + "31 USD 0.0 0.420000 0.420000 southafricawest \n", + "32 USD 0.0 0.420000 0.420000 southafricawest \n", + "34 USD 0.0 0.424000 0.424000 japaneast \n", + "36 USD 0.0 0.403024 0.403024 australiasoutheast \n", + "37 USD 0.0 0.314500 0.314500 uaecentral \n", + "38 USD 0.0 1.991000 1.991000 japaneast \n", + "39 USD 0.0 0.483000 0.483000 switzerlandnorth \n", + "42 USD 0.0 0.389939 0.389939 japanwest \n", + "43 USD 0.0 0.411800 0.411800 southeastasia \n", + "45 USD 0.0 2.057530 2.057530 australiaeast \n", + "47 USD 0.0 3.872000 3.872000 usgovarizona \n", + "50 USD 0.0 8.294000 8.294000 japanwest \n", + "51 USD 0.0 1.000000 1.000000 canadacentral \n", + "54 USD 0.0 17.373000 17.373000 brazilsouth \n", + "55 USD 0.0 4.838000 4.838000 southcentralus \n", + "59 USD 0.0 0.212000 0.212000 westcentralus \n", + "60 USD 0.0 0.212000 0.212000 westcentralus \n", + "62 USD 0.0 0.181440 0.181440 southindia \n", + "63 USD 0.0 0.456000 0.456000 canadacentral \n", + "66 USD 0.0 0.456000 0.456000 canadacentral \n", + "67 USD 0.0 0.039110 0.039110 usgovarizona \n", + "68 USD 0.0 0.105000 0.105000 eastus2 \n", + "69 USD 0.0 1.449600 1.449600 australiacentral2 \n", + "71 USD 0.0 10.440000 10.440000 southindia \n", + "72 USD 0.0 0.338691 0.338691 uaenorth \n", + "74 USD 0.0 6.768000 6.768000 northeurope \n", + "78 USD 0.0 3.224400 3.224400 uknorth \n", + "79 USD 0.0 0.055200 0.055200 canadaeast \n", + "80 USD 0.0 0.055200 0.055200 canadaeast \n", + "81 USD 0.0 2.093000 2.093000 westus2 \n", + "83 USD 0.0 2.093000 2.093000 westus2 \n", + "85 USD 0.0 0.157200 0.157200 uaecentral \n", + "86 USD 0.0 0.054000 0.054000 centralus \n", + "88 USD 0.0 0.538474 0.538474 southafricawest \n", + "90 USD 0.0 2.551000 2.551000 westindia \n", + "92 USD 0.0 0.723000 0.723000 westus2 \n", + "94 USD 0.0 0.184710 0.184710 australiacentral \n", + "96 USD 0.0 0.272000 0.272000 uaecentral \n", + "97 USD 0.0 1.949000 1.949000 uksouth \n", + "99 USD 0.0 40.896000 40.896000 eastus2 \n", + "\n", + " location effectiveStartDate effectiveEndDate \\\n", + "1 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "3 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "4 UK North 2019-10-16T00:00:00Z NA \n", + "6 US West 2021-11-01T00:00:00Z NA \n", + "7 IN West 2021-02-01T00:00:00Z NA \n", + "8 EU North 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "9 US East 2 2021-12-01T00:00:00Z NA \n", + "12 AU Southeast 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "13 US North Central 2018-09-01T00:00:00Z NA \n", + "14 US North Central 2018-09-01T00:00:00Z NA \n", + "15 BR South 2016-09-01T00:00:00Z NA \n", + "16 US Central 2020-08-01T00:00:00Z NA \n", + "17 KR South 2021-11-01T00:00:00Z NA \n", + "20 EU West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "21 IN West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "23 US West 2 2021-11-01T00:00:00Z NA \n", + "25 JA East 2021-11-01T00:00:00Z NA \n", + "26 US Gov TX 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "27 KR South 2021-12-01T00:00:00Z NA \n", + "30 US East 2021-10-01T00:00:00Z NA \n", + "31 ZA West 2020-09-01T00:00:00Z NA \n", + "32 ZA West 2020-09-01T00:00:00Z NA \n", + "34 JA East 2016-01-11T00:00:00Z NA \n", + "36 AU Southeast 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "37 AE Central 2022-02-01T00:00:00Z NA \n", + "38 JA East 2021-11-01T00:00:00Z NA \n", + "39 CH North 2021-11-01T00:00:00Z NA \n", + "42 JA West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "43 AP Southeast 2021-12-01T00:00:00Z NA \n", + "45 AU East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "47 US Gov AZ 2020-08-01T00:00:00Z NA \n", + "50 JA West 2020-08-01T00:00:00Z NA \n", + "51 CA Central 2020-06-01T00:00:00Z NA \n", + "54 BR South 2022-02-01T00:00:00Z NA \n", + "55 US South Central 2020-08-01T00:00:00Z NA \n", + "59 US West Central 2021-11-01T00:00:00Z NA \n", + "60 US West Central 2021-11-01T00:00:00Z NA \n", + "62 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "63 CA Central 2021-10-01T00:00:00Z NA \n", + "66 CA Central 2021-10-01T00:00:00Z NA \n", + "67 US Gov AZ 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "68 US East 2 2021-11-01T00:00:00Z NA \n", + "69 AU Central 2 2021-11-01T00:00:00Z NA \n", + "71 IN South 2021-02-01T00:00:00Z NA \n", + "72 AE North 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "74 EU North 2021-11-01T00:00:00Z NA \n", + "78 UK North 2019-10-16T00:00:00Z NA \n", + "79 CA East 2021-11-01T00:00:00Z NA \n", + "80 CA East 2021-11-01T00:00:00Z NA \n", + "81 US West 2 2019-06-01T00:00:00Z NA \n", + "83 US West 2 2019-06-01T00:00:00Z NA \n", + "85 AE Central 2022-02-01T00:00:00Z NA \n", + "86 US Central 2022-03-01T00:00:00Z NA \n", + "88 ZA West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "90 IN West 2021-02-01T00:00:00Z NA \n", + "92 US West 2 2020-06-01T00:00:00Z NA \n", + "94 AU Central 2021-11-01T00:00:00Z NA \n", + "96 AE Central 2021-11-01T00:00:00Z NA \n", + "97 UK South 2021-11-01T00:00:00Z NA \n", + "99 US East 2 2021-01-01T00:00:00Z NA \n", + "\n", + " meterId meterName ... \\\n", + "1 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", + "3 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", + "4 0001e46a-9285-5fa8-b48a-240e307a24f7 A3 Spot ... \n", + "6 00026917-5c42-5cf2-994e-4037490635aa E2bds v5 Spot ... \n", + "7 000419bc-6006-53ea-8976-1644249b9728 D2 v4 Low Priority ... \n", + "8 00045dc9-530b-5c69-94ff-1a8cb5475849 E2s v5 Spot ... \n", + "9 0007942f-35ac-5c71-9845-63365457677b D16s v5 ... \n", + "12 00081217-b2ba-5564-b978-05466d34bb98 E16-8ads v5 Spot ... \n", + "13 0008a792-d49f-4f13-a461-9c9f24e92ccf D14 v2/DS14 v2 - Expired ... \n", + "14 0008a792-d49f-4f13-a461-9c9f24e92ccf DS14 v2 - Expired ... \n", + "15 0008ac09-705a-431e-b9c7-026746cb920a A2 ... \n", + "16 0009109e-82c2-5cc4-a0e0-91354982115c E8-2s v4 Low Priority ... \n", + "17 0009a0a2-af7b-5fc7-9e4a-a0c5e18c0dfb D96 v5 Low Priority ... \n", + "20 000a794b-bdb0-58be-a0cd-0c3a0f222923 F16s Spot ... \n", + "21 000a9e97-ffbf-58eb-ac5a-94e4fe39065e DS4 v2 Spot ... \n", + "23 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", + "25 000b49e6-05c3-56b7-a568-dd694eda0217 E20d v5 Low Priority ... \n", + "26 000b8582-d57d-5831-b49f-f8150e4b545e F16s Spot ... \n", + "27 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", + "30 000c494f-505a-508d-84e3-6c512039061f DC8as v5 Low Priority ... \n", + "31 000db1d1-1d7f-484f-a2c2-144eeb049ae3 E20 v3/E20s v3 Low Priority ... \n", + "32 000db1d1-1d7f-484f-a2c2-144eeb049ae3 E20s v3 Low Priority ... \n", + "34 000e0d7d-c353-4741-9ffc-e9fcdaebf8f7 A3 ... \n", + "36 0010a9ec-605e-5713-905c-d621b5c24287 F16/F16s Spot ... \n", + "37 00122690-2bfb-5526-99aa-e623c03c9cb5 E32 v4 Spot ... \n", + "38 00127bb7-c581-530f-87b6-83075ba4c830 E104ids v5 Low Priority ... \n", + "39 00136631-af19-59d8-b589-64539bf4c313 D4ds v5 ... \n", + "42 0013b5b5-1def-5033-8bc4-996ad572c70b D16ds v5 Spot ... \n", + "43 0013cc18-d927-5e54-b9d2-8c33426c8731 HC44-32rs Spot ... \n", + "45 0013dbe4-13bb-5ffc-a2ab-7e458c213b4c E64-16s v4 Spot ... \n", + "47 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", + "50 00152fd6-8833-5153-b72d-d22ea8d21a58 E64s v4 ... \n", + "51 0015ecfc-d496-53fc-bdf0-51f386309382 E20ds v4 Low Priority ... \n", + "54 0015fba1-4cb7-52b0-9c1a-10b973586310 M416s v2 Spot ... \n", + "55 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", + "59 00172462-4604-5a25-b1d4-f057577d68e0 E4ds v5 Low Priority ... \n", + "60 00172462-4604-5a25-b1d4-f057577d68e0 E4-2ds v5 Low Priority ... \n", + "62 001752ab-2e87-599e-8fac-f1ada637ca61 D5 v2/DS5 v2 Spot ... \n", + "63 001790af-f893-596a-b4f9-7b0837df43e3 DS13 Low Priority ... \n", + "66 001790af-f893-596a-b4f9-7b0837df43e3 D13/DS13 Low Priority ... \n", + "67 0017db3a-769f-5580-b8a3-b5321d90d855 NV4as v4 Spot ... \n", + "68 001890d1-4eeb-5c0f-aadd-ac36d1491470 E8-4ads v5 Low Priority ... \n", + "69 00194e51-843b-511a-b0a5-08b9ba78a2fe E48s v5 Spot ... \n", + "71 0019a4a1-0edb-5a85-adc2-88ec83185792 M128 Low Priority ... \n", + "72 001a63f3-4e3e-5294-b452-3b085c7f3342 D16s v3 Spot ... \n", + "74 001a6f90-bc8f-572e-b7bc-f95af3413781 E96 v5 ... \n", + "78 001a9491-4161-57d9-8706-6ea34207a896 E64 v3/E64s v3 Spot ... \n", + "79 001b8a57-c3fa-543f-b93c-95fa79f110ed E4s v5 Low Priority ... \n", + "80 001b8a57-c3fa-543f-b93c-95fa79f110ed E4-2s v5 Low Priority ... \n", + "81 001bb3f4-7d99-4d22-9aaa-052b3f2463e0 E48 v3/E48s v3 Low Priority ... \n", + "83 001bb3f4-7d99-4d22-9aaa-052b3f2463e0 E48s v3 Low Priority ... \n", + "85 001c6265-1401-56fd-879f-4101ef0f295e E16 v4 Spot ... \n", + "86 001caea7-ff8a-5957-8480-7f1121cc1976 A3 Spot ... \n", + "88 001d3eb5-55b4-5b5e-84d4-cb22a0dd91f0 E16ds v4 Spot ... \n", + "90 001dbef5-9180-5e2c-b699-53f786ae1dda E48ds v4 Low Priority ... \n", + "92 001e13b1-2bad-525e-b9a7-02de9f2be735 D64ds v4 Low Priority ... \n", + "94 001effd3-ac3b-5c06-a9f4-1cb6f7f70d45 E8-2ds v4 Spot ... \n", + "96 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 D2ds v5 ... \n", + "97 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 D48s v5 Low Priority ... \n", + "99 00204db1-b465-59e2-baa7-bc6b848c5b78 M192idms_v2 ... \n", + "\n", + " productName skuName \\\n", + "1 Virtual Machines D Series Windows D14 Spot \n", + "3 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", + "4 Virtual Machines A Series Windows A3 Spot \n", + "6 Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot \n", + "7 Virtual Machines Dv4 Series D2 v4 Low Priority \n", + "8 Virtual Machines Esv5 Series E2s v5 Spot \n", + "9 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 \n", + "12 Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot \n", + "13 Virtual Machines Dv2 promo Series D14 v2 \n", + "14 Virtual Machines DSv2 promo Series DS14 v2 \n", + "15 Virtual Machines A Series Basic A2 \n", + "16 Virtual Machines Esv4 Series E8-2s v4 Low Priority \n", + "17 Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority \n", + "20 Virtual Machines FS Series Windows F16s Spot \n", + "21 Virtual Machines DSv2 Series DS4 v2 Spot \n", + "23 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", + "25 Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority \n", + "26 Virtual Machines FS Series Windows F16s Spot \n", + "27 Easv4 Series Dedicated Host Easv4 Type2 \n", + "30 DCasv5-series Linux Standard_DC8as_v5 Low Priority \n", + "31 Virtual Machines Ev3 Series E20 v3 Low Priority \n", + "32 Virtual Machines ESv3 Series E20s v3 Low Priority \n", + "34 Virtual Machines A Series Windows A3 \n", + "36 Virtual Machines F Series Windows F16 Spot \n", + "37 Virtual Machines Ev4 Series E32 v4 Spot \n", + "38 Virtual Machines Edsv5 Series E104ids v5 Low Priority \n", + "39 Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 \n", + "42 Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot \n", + "43 Virtual Machines HCS Series HC44-32rs Spot \n", + "45 Virtual Machines Esv4 Series Windows E64-16s v4 Spot \n", + "47 Virtual Machines Dsv4 Series D64s v4 \n", + "50 Virtual Machines Esv4 Series Windows E64s v4 \n", + "51 Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority \n", + "54 Virtual Machines MSv2 Series Windows M416s v2 Spot \n", + "55 Virtual Machines Ev4 Series E64 v4 \n", + "59 Virtual Machines Edsv5 Series Windows E4ds v5 Low Priority \n", + "60 Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority \n", + "62 Virtual Machines Dv2 Series D5 v2 Spot \n", + "63 Virtual Machines DS Series Windows DS13 Low Priority \n", + "66 Virtual Machines D Series Windows D13 Low Priority \n", + "67 Virtual Machines NVasv4 Series NV4as v4 Spot \n", + "68 Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority \n", + "69 Virtual Machines Esv5 Series E48s v5 Spot \n", + "71 Virtual Machines MS Series Windows M128 Low Priority \n", + "72 Virtual Machines DSv3 Series Windows D16s v3 Spot \n", + "74 Virtual Machines Ev5 Series Standard_E96_v5 \n", + "78 Virtual Machines Ev3 Series Windows E64 v3 Spot \n", + "79 Virtual Machines Esv5 Series E4s v5 Low Priority \n", + "80 Virtual Machines Esv5 Series E4-2s v5 Low Priority \n", + "81 Virtual Machines Ev3 Series Windows E48 v3 Low Priority \n", + "83 Virtual Machines ESv3 Series Windows E48s v3 Low Priority \n", + "85 Virtual Machines Ev4 Series E16 v4 Spot \n", + "86 Virtual Machines A Series Windows A3 Spot \n", + "88 Virtual Machines Edsv4 Series Windows E16ds v4 Spot \n", + "90 Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority \n", + "92 Virtual Machines Ddsv4 Series D64ds v4 Low Priority \n", + "94 Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot \n", + "96 Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 \n", + "97 Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority \n", + "99 Virtual Machines MdSv2 Series Windows M192idms_v2 \n", + "\n", + " serviceName serviceId serviceFamily unitOfMeasure type \\\n", + "1 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "3 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "4 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "6 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "7 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "8 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "9 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "12 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "13 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "14 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "15 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "16 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "17 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "20 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "21 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "23 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "25 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "26 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "27 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "30 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "31 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "32 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "34 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "36 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "37 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "38 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "39 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "42 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "43 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "45 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "47 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "50 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "51 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "54 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "55 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "59 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "60 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "62 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "63 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "66 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "67 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "68 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "69 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "71 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "72 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "74 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "78 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "79 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "80 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "81 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "83 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "85 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "86 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "88 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "90 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "92 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "94 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "96 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "97 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "99 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "\n", + " isPrimaryMeterRegion armSkuName reservationTerm \n", + "1 True Standard_D14 NA \n", + "3 True Standard_D64s_v5 NA \n", + "4 True Standard_A3 NA \n", + "6 True Standard_E2bds_v5 NA \n", + "7 True Standard_D2_v4 NA \n", + "8 True Standard_E2s_v5 NA \n", + "9 True Standard_D16s_v5 NA \n", + "12 True Standard_E16-8ads_v5 NA \n", + "13 True Standard_D14_v2_Promo NA \n", + "14 False Standard_DS14_v2_Promo NA \n", + "15 True Basic_A2 NA \n", + "16 True Standard_E8-2s_v4 NA \n", + "17 True Standard_D96_v5 NA \n", + "20 True Standard_F16s NA \n", + "21 True Standard_DS4_v2 NA \n", + "23 True Standard_D64ds_v5 NA \n", + "25 True Standard_E20d_v5 NA \n", + "26 True Standard_F16s NA \n", + "27 True Easv4_Type2 NA \n", + "30 True Standard_DC8as_v5 NA \n", + "31 True Standard_E20_v3 NA \n", + "32 False Standard_E20s_v3 NA \n", + "34 True Standard_A3 NA \n", + "36 True Standard_F16 NA \n", + "37 True Standard_E32_v4 NA \n", + "38 True Standard_E104ids_v5 NA \n", + "39 True Standard_D4ds_v5 NA \n", + "42 True Standard_D16ds_v5 NA \n", + "43 True Standard_HC44-32rs NA \n", + "45 True Standard_E64-16s_v4 NA \n", + "47 True Standard_D64s_v4 NA \n", + "50 True Standard_E64s_v4 NA \n", + "51 True Standard_E20ds_v4 NA \n", + "54 True Standard_M416s_v2 NA \n", + "55 True Standard_E64_v4 NA \n", + "59 True Standard_E4ds_v5 NA \n", + "60 False Standard_E4-2ds_v5 NA \n", + "62 True Standard_D5_v2 NA \n", + "63 False Standard_DS13 NA \n", + "66 True Standard_D13 NA \n", + "67 True Standard_NV4as_v4 NA \n", + "68 True Standard_E8-4ads_v5 NA \n", + "69 True Standard_E48s_v5 NA \n", + "71 True Standard_M128 NA \n", + "72 True Standard_D16s_v3 NA \n", + "74 True Standard_E96_v5 NA \n", + "78 True Standard_E64_v3 NA \n", + "79 True Standard_E4s_v5 NA \n", + "80 False Standard_E4-2s_v5 NA \n", + "81 True Standard_E48_v3 NA \n", + "83 False Standard_E48s_v3 NA \n", + "85 True Standard_E16_v4 NA \n", + "86 True Standard_A3 NA \n", + "88 True Standard_E16ds_v4 NA \n", + "90 True Standard_E48ds_v4 NA \n", + "92 True Standard_D64ds_v4 NA \n", + "94 True Standard_E8-2ds_v4 NA \n", + "96 True Standard_D2ds_v5 NA \n", + "97 True Standard_D48s_v5 NA \n", + "99 True Standard_M192idms_v2 NA \n", + "\n", + "[60 rows x 22 columns]\n" + ] } ], "source": [ - "pd.unique(dfi_normalize[\"skuName\"])\n", - "#pd.Series((dfi_s[\"productName\"])).unique()\n", - "#pd.Series((dfi_normalize[\"armRegionName\"])).unique()" + "df_consumption = df_items_2.loc[(df_items_2[\"type\"] == \"Consumption\")]\n", + "print(df_consumption)" ] }, { "cell_type": "code", - "execution_count": 91, + "execution_count": 56, + "id": "0cb2987d", "metadata": { "ExecuteTime": { - "end_time": "2022-03-20T03:43:35.761515Z", - "start_time": "2022-03-20T03:43:35.703678Z" + "end_time": "2022-03-29T14:13:11.063715Z", + "start_time": "2022-03-29T14:13:10.943916Z" } }, "outputs": [ @@ -960,11 +1338,13 @@ " currencyCode\n", " serviceName\n", " serviceFamily\n", + " reservationTerm\n", + " type\n", " \n", " \n", " \n", " \n", - " 0\n", + " 1\n", " southindia\n", " Virtual Machines D Series Windows\n", " D14 Spot\n", @@ -972,168 +1352,934 @@ " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 1\n", - " southindia\n", - " Virtual Machines D Series Windows\n", - " D14 Spot\n", - " 0.262752\n", + " 3\n", + " eastasia\n", + " Virtual Machines Dsv5 Series Windows\n", + " Standard_D64s_v5 Spot\n", + " 1.468006\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 2\n", - " eastasia\n", - " Virtual Machines Dsv5 Series Windows\n", - " Standard_D64s_v5 Spot\n", - " 1.468006\n", + " 4\n", + " uknorth\n", + " Virtual Machines A Series Windows\n", + " A3 Spot\n", + " 0.190000\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 3\n", - " eastasia\n", + " 6\n", + " westus\n", + " Virtual Machines Ebdsv5 Series\n", + " Standard_E2bds_v5 Spot\n", + " 0.075600\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 7\n", + " westindia\n", + " Virtual Machines Dv4 Series\n", + " D2 v4 Low Priority\n", + " 0.023600\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 8\n", + " northeurope\n", + " Virtual Machines Esv5 Series\n", + " E2s v5 Spot\n", + " 0.036547\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 9\n", + " eastus2\n", " Virtual Machines Dsv5 Series Windows\n", - " Standard_D64s_v5 Spot\n", - " 0.865075\n", + " Standard_D16s_v5\n", + " 1.504000\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 4\n", - " uknorth\n", - " Virtual Machines A Series Windows\n", - " A3 Spot\n", - " 0.062988\n", + " 12\n", + " australiasoutheast\n", + " Virtual Machines Eadsv5 Series Windows\n", + " E16-8ads v5 Spot\n", + " 0.537088\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", - " ...\n", + " 13\n", + " northcentralus\n", + " Virtual Machines Dv2 promo Series\n", + " D14 v2\n", + " 1.482000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 95\n", - " uaecentral\n", - " Virtual Machines Ddsv5 Series Windows\n", - " Standard_D2ds_v5\n", - " 0.272000\n", + " 14\n", + " northcentralus\n", + " Virtual Machines DSv2 promo Series\n", + " DS14 v2\n", + " 1.482000\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 96\n", - " uaecentral\n", - " Virtual Machines Ddsv5 Series Windows\n", - " Standard_D2ds_v5\n", - " 0.180000\n", + " 15\n", + " brazilsouth\n", + " Virtual Machines A Series Basic\n", + " A2\n", + " 0.112000\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 97\n", - " uksouth\n", - " Virtual Machines Dsv5 Series Windows\n", - " Standard_D48s_v5 Low Priority\n", - " 1.949000\n", + " 16\n", + " centralus\n", + " Virtual Machines Esv4 Series\n", + " E8-2s v4 Low Priority\n", + " 0.114000\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 98\n", - " uksouth\n", - " Virtual Machines Dsv5 Series Windows\n", - " Standard_D48s_v5 Low Priority\n", - " 0.533000\n", + " 17\n", + " koreasouth\n", + " Virtual Machines Dv5 Series Windows\n", + " Standard_D96_v5 Low Priority\n", + " 3.886000\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", " \n", - " 99\n", - " eastus2\n", - " Virtual Machines MdSv2 Series Windows\n", - " M192idms_v2\n", - " 32.064000\n", + " 20\n", + " westeurope\n", + " Virtual Machines FS Series Windows\n", + " F16s Spot\n", + " 0.571308\n", " USD\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " \n", - " \n", - "\n", - "

100 rows × 7 columns

\n", - "" - ], - "text/plain": [ - " armRegionName productName \\\n", - "0 southindia Virtual Machines D Series Windows \n", - "1 southindia Virtual Machines D Series Windows \n", - "2 eastasia Virtual Machines Dsv5 Series Windows \n", - "3 eastasia Virtual Machines Dsv5 Series Windows \n", - "4 uknorth Virtual Machines A Series Windows \n", - ".. ... ... \n", - "95 uaecentral Virtual Machines Ddsv5 Series Windows \n", - "96 uaecentral Virtual Machines Ddsv5 Series Windows \n", - "97 uksouth Virtual Machines Dsv5 Series Windows \n", - "98 uksouth Virtual Machines Dsv5 Series Windows \n", - "99 eastus2 Virtual Machines MdSv2 Series Windows \n", - "\n", - " skuName retailPrice currencyCode serviceName \\\n", - "0 D14 Spot 0.542506 USD Virtual Machines \n", - "1 D14 Spot 0.262752 USD Virtual Machines \n", - "2 Standard_D64s_v5 Spot 1.468006 USD Virtual Machines \n", - "3 Standard_D64s_v5 Spot 0.865075 USD Virtual Machines \n", - "4 A3 Spot 0.062988 USD Virtual Machines \n", - ".. ... ... ... ... \n", - "95 Standard_D2ds_v5 0.272000 USD Virtual Machines \n", - "96 Standard_D2ds_v5 0.180000 USD Virtual Machines \n", - "97 Standard_D48s_v5 Low Priority 1.949000 USD Virtual Machines \n", - "98 Standard_D48s_v5 Low Priority 0.533000 USD Virtual Machines \n", - "99 M192idms_v2 32.064000 USD Virtual Machines \n", - "\n", - " serviceFamily \n", - "0 Compute \n", - "1 Compute \n", - "2 Compute \n", - "3 Compute \n", - "4 Compute \n", - ".. ... \n", - "95 Compute \n", - "96 Compute \n", - "97 Compute \n", - "98 Compute \n", - "99 Compute \n", + " \n", + " 21\n", + " westindia\n", + " Virtual Machines DSv2 Series\n", + " DS4 v2 Spot\n", + " 0.090720\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 23\n", + " westus2\n", + " Virtual Machines Ddsv5 Series\n", + " Standard_D64ds_v5\n", + " 3.616000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 25\n", + " japaneast\n", + " Virtual Machines Edv5 Series\n", + " Standard_E20d_v5 Low Priority\n", + " 0.348000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 26\n", + " usgovtexas\n", + " Virtual Machines FS Series Windows\n", + " F16s Spot\n", + " 0.341510\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 27\n", + " koreasouth\n", + " Easv4 Series Dedicated Host\n", + " Easv4 Type2\n", + " 7.603000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 30\n", + " eastus\n", + " DCasv5-series Linux\n", + " Standard_DC8as_v5 Low Priority\n", + " 0.108000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 31\n", + " southafricawest\n", + " Virtual Machines Ev3 Series\n", + " E20 v3 Low Priority\n", + " 0.420000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 32\n", + " southafricawest\n", + " Virtual Machines ESv3 Series\n", + " E20s v3 Low Priority\n", + " 0.420000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 34\n", + " japaneast\n", + " Virtual Machines A Series Windows\n", + " A3\n", + " 0.424000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 36\n", + " australiasoutheast\n", + " Virtual Machines F Series Windows\n", + " F16 Spot\n", + " 0.403024\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 37\n", + " uaecentral\n", + " Virtual Machines Ev4 Series\n", + " E32 v4 Spot\n", + " 0.314500\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 38\n", + " japaneast\n", + " Virtual Machines Edsv5 Series\n", + " E104ids v5 Low Priority\n", + " 1.991000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 39\n", + " switzerlandnorth\n", + " Virtual Machines Ddsv5 Series Windows\n", + " Standard_D4ds_v5\n", + " 0.483000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 42\n", + " japanwest\n", + " Virtual Machines Ddsv5 Series Windows\n", + " Standard_D16ds_v5 Spot\n", + " 0.389939\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 43\n", + " southeastasia\n", + " Virtual Machines HCS Series\n", + " HC44-32rs Spot\n", + " 0.411800\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 45\n", + " australiaeast\n", + " Virtual Machines Esv4 Series Windows\n", + " E64-16s v4 Spot\n", + " 2.057530\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 47\n", + " usgovarizona\n", + " Virtual Machines Dsv4 Series\n", + " D64s v4\n", + " 3.872000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 50\n", + " japanwest\n", + " Virtual Machines Esv4 Series Windows\n", + " E64s v4\n", + " 8.294000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 51\n", + " canadacentral\n", + " Virtual Machines Edsv4 Series Windows\n", + " E20ds v4 Low Priority\n", + " 1.000000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 54\n", + " brazilsouth\n", + " Virtual Machines MSv2 Series Windows\n", + " M416s v2 Spot\n", + " 17.373000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 55\n", + " southcentralus\n", + " Virtual Machines Ev4 Series\n", + " E64 v4\n", + " 4.838000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 59\n", + " westcentralus\n", + " Virtual Machines Edsv5 Series Windows\n", + " E4ds v5 Low Priority\n", + " 0.212000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 60\n", + " westcentralus\n", + " Virtual Machines Edsv5 Series Windows\n", + " E4-2ds v5 Low Priority\n", + " 0.212000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 62\n", + " southindia\n", + " Virtual Machines Dv2 Series\n", + " D5 v2 Spot\n", + " 0.181440\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 63\n", + " canadacentral\n", + " Virtual Machines DS Series Windows\n", + " DS13 Low Priority\n", + " 0.456000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 66\n", + " canadacentral\n", + " Virtual Machines D Series Windows\n", + " D13 Low Priority\n", + " 0.456000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 67\n", + " usgovarizona\n", + " Virtual Machines NVasv4 Series\n", + " NV4as v4 Spot\n", + " 0.039110\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 68\n", + " eastus2\n", + " Virtual Machines Eadsv5 Series\n", + " E8-4ads v5 Low Priority\n", + " 0.105000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 69\n", + " australiacentral2\n", + " Virtual Machines Esv5 Series\n", + " E48s v5 Spot\n", + " 1.449600\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 71\n", + " southindia\n", + " Virtual Machines MS Series Windows\n", + " M128 Low Priority\n", + " 10.440000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 72\n", + " uaenorth\n", + " Virtual Machines DSv3 Series Windows\n", + " D16s v3 Spot\n", + " 0.338691\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 74\n", + " northeurope\n", + " Virtual Machines Ev5 Series\n", + " Standard_E96_v5\n", + " 6.768000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 78\n", + " uknorth\n", + " Virtual Machines Ev3 Series Windows\n", + " E64 v3 Spot\n", + " 3.224400\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 79\n", + " canadaeast\n", + " Virtual Machines Esv5 Series\n", + " E4s v5 Low Priority\n", + " 0.055200\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 80\n", + " canadaeast\n", + " Virtual Machines Esv5 Series\n", + " E4-2s v5 Low Priority\n", + " 0.055200\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 81\n", + " westus2\n", + " Virtual Machines Ev3 Series Windows\n", + " E48 v3 Low Priority\n", + " 2.093000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 83\n", + " westus2\n", + " Virtual Machines ESv3 Series Windows\n", + " E48s v3 Low Priority\n", + " 2.093000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 85\n", + " uaecentral\n", + " Virtual Machines Ev4 Series\n", + " E16 v4 Spot\n", + " 0.157200\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 86\n", + " centralus\n", + " Virtual Machines A Series Windows\n", + " A3 Spot\n", + " 0.054000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 88\n", + " southafricawest\n", + " Virtual Machines Edsv4 Series Windows\n", + " E16ds v4 Spot\n", + " 0.538474\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 90\n", + " westindia\n", + " Virtual Machines Edsv4 Series Windows\n", + " E48ds v4 Low Priority\n", + " 2.551000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 92\n", + " westus2\n", + " Virtual Machines Ddsv4 Series\n", + " D64ds v4 Low Priority\n", + " 0.723000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 94\n", + " australiacentral\n", + " Virtual Machines Edsv4 Series Windows\n", + " E8-2ds v4 Spot\n", + " 0.184710\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 96\n", + " uaecentral\n", + " Virtual Machines Ddsv5 Series Windows\n", + " Standard_D2ds_v5\n", + " 0.272000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 97\n", + " uksouth\n", + " Virtual Machines Dsv5 Series Windows\n", + " Standard_D48s_v5 Low Priority\n", + " 1.949000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + " 99\n", + " eastus2\n", + " Virtual Machines MdSv2 Series Windows\n", + " M192idms_v2\n", + " 40.896000\n", + " USD\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " \n", + " \n", + "\n", + "" + ], + "text/plain": [ + " armRegionName productName \\\n", + "1 southindia Virtual Machines D Series Windows \n", + "3 eastasia Virtual Machines Dsv5 Series Windows \n", + "4 uknorth Virtual Machines A Series Windows \n", + "6 westus Virtual Machines Ebdsv5 Series \n", + "7 westindia Virtual Machines Dv4 Series \n", + "8 northeurope Virtual Machines Esv5 Series \n", + "9 eastus2 Virtual Machines Dsv5 Series Windows \n", + "12 australiasoutheast Virtual Machines Eadsv5 Series Windows \n", + "13 northcentralus Virtual Machines Dv2 promo Series \n", + "14 northcentralus Virtual Machines DSv2 promo Series \n", + "15 brazilsouth Virtual Machines A Series Basic \n", + "16 centralus Virtual Machines Esv4 Series \n", + "17 koreasouth Virtual Machines Dv5 Series Windows \n", + "20 westeurope Virtual Machines FS Series Windows \n", + "21 westindia Virtual Machines DSv2 Series \n", + "23 westus2 Virtual Machines Ddsv5 Series \n", + "25 japaneast Virtual Machines Edv5 Series \n", + "26 usgovtexas Virtual Machines FS Series Windows \n", + "27 koreasouth Easv4 Series Dedicated Host \n", + "30 eastus DCasv5-series Linux \n", + "31 southafricawest Virtual Machines Ev3 Series \n", + "32 southafricawest Virtual Machines ESv3 Series \n", + "34 japaneast Virtual Machines A Series Windows \n", + "36 australiasoutheast Virtual Machines F Series Windows \n", + "37 uaecentral Virtual Machines Ev4 Series \n", + "38 japaneast Virtual Machines Edsv5 Series \n", + "39 switzerlandnorth Virtual Machines Ddsv5 Series Windows \n", + "42 japanwest Virtual Machines Ddsv5 Series Windows \n", + "43 southeastasia Virtual Machines HCS Series \n", + "45 australiaeast Virtual Machines Esv4 Series Windows \n", + "47 usgovarizona Virtual Machines Dsv4 Series \n", + "50 japanwest Virtual Machines Esv4 Series Windows \n", + "51 canadacentral Virtual Machines Edsv4 Series Windows \n", + "54 brazilsouth Virtual Machines MSv2 Series Windows \n", + "55 southcentralus Virtual Machines Ev4 Series \n", + "59 westcentralus Virtual Machines Edsv5 Series Windows \n", + "60 westcentralus Virtual Machines Edsv5 Series Windows \n", + "62 southindia Virtual Machines Dv2 Series \n", + "63 canadacentral Virtual Machines DS Series Windows \n", + "66 canadacentral Virtual Machines D Series Windows \n", + "67 usgovarizona Virtual Machines NVasv4 Series \n", + "68 eastus2 Virtual Machines Eadsv5 Series \n", + "69 australiacentral2 Virtual Machines Esv5 Series \n", + "71 southindia Virtual Machines MS Series Windows \n", + "72 uaenorth Virtual Machines DSv3 Series Windows \n", + "74 northeurope Virtual Machines Ev5 Series \n", + "78 uknorth Virtual Machines Ev3 Series Windows \n", + "79 canadaeast Virtual Machines Esv5 Series \n", + "80 canadaeast Virtual Machines Esv5 Series \n", + "81 westus2 Virtual Machines Ev3 Series Windows \n", + "83 westus2 Virtual Machines ESv3 Series Windows \n", + "85 uaecentral Virtual Machines Ev4 Series \n", + "86 centralus Virtual Machines A Series Windows \n", + "88 southafricawest Virtual Machines Edsv4 Series Windows \n", + "90 westindia Virtual Machines Edsv4 Series Windows \n", + "92 westus2 Virtual Machines Ddsv4 Series \n", + "94 australiacentral Virtual Machines Edsv4 Series Windows \n", + "96 uaecentral Virtual Machines Ddsv5 Series Windows \n", + "97 uksouth Virtual Machines Dsv5 Series Windows \n", + "99 eastus2 Virtual Machines MdSv2 Series Windows \n", "\n", - "[100 rows x 7 columns]" + " skuName retailPrice currencyCode \\\n", + "1 D14 Spot 0.542506 USD \n", + "3 Standard_D64s_v5 Spot 1.468006 USD \n", + "4 A3 Spot 0.190000 USD \n", + "6 Standard_E2bds_v5 Spot 0.075600 USD \n", + "7 D2 v4 Low Priority 0.023600 USD \n", + "8 E2s v5 Spot 0.036547 USD \n", + "9 Standard_D16s_v5 1.504000 USD \n", + "12 E16-8ads v5 Spot 0.537088 USD \n", + "13 D14 v2 1.482000 USD \n", + "14 DS14 v2 1.482000 USD \n", + "15 A2 0.112000 USD \n", + "16 E8-2s v4 Low Priority 0.114000 USD \n", + "17 Standard_D96_v5 Low Priority 3.886000 USD \n", + "20 F16s Spot 0.571308 USD \n", + "21 DS4 v2 Spot 0.090720 USD \n", + "23 Standard_D64ds_v5 3.616000 USD \n", + "25 Standard_E20d_v5 Low Priority 0.348000 USD \n", + "26 F16s Spot 0.341510 USD \n", + "27 Easv4 Type2 7.603000 USD \n", + "30 Standard_DC8as_v5 Low Priority 0.108000 USD \n", + "31 E20 v3 Low Priority 0.420000 USD \n", + "32 E20s v3 Low Priority 0.420000 USD \n", + "34 A3 0.424000 USD \n", + "36 F16 Spot 0.403024 USD \n", + "37 E32 v4 Spot 0.314500 USD \n", + "38 E104ids v5 Low Priority 1.991000 USD \n", + "39 Standard_D4ds_v5 0.483000 USD \n", + "42 Standard_D16ds_v5 Spot 0.389939 USD \n", + "43 HC44-32rs Spot 0.411800 USD \n", + "45 E64-16s v4 Spot 2.057530 USD \n", + "47 D64s v4 3.872000 USD \n", + "50 E64s v4 8.294000 USD \n", + "51 E20ds v4 Low Priority 1.000000 USD \n", + "54 M416s v2 Spot 17.373000 USD \n", + "55 E64 v4 4.838000 USD \n", + "59 E4ds v5 Low Priority 0.212000 USD \n", + "60 E4-2ds v5 Low Priority 0.212000 USD \n", + "62 D5 v2 Spot 0.181440 USD \n", + "63 DS13 Low Priority 0.456000 USD \n", + "66 D13 Low Priority 0.456000 USD \n", + "67 NV4as v4 Spot 0.039110 USD \n", + "68 E8-4ads v5 Low Priority 0.105000 USD \n", + "69 E48s v5 Spot 1.449600 USD \n", + "71 M128 Low Priority 10.440000 USD \n", + "72 D16s v3 Spot 0.338691 USD \n", + "74 Standard_E96_v5 6.768000 USD \n", + "78 E64 v3 Spot 3.224400 USD \n", + "79 E4s v5 Low Priority 0.055200 USD \n", + "80 E4-2s v5 Low Priority 0.055200 USD \n", + "81 E48 v3 Low Priority 2.093000 USD \n", + "83 E48s v3 Low Priority 2.093000 USD \n", + "85 E16 v4 Spot 0.157200 USD \n", + "86 A3 Spot 0.054000 USD \n", + "88 E16ds v4 Spot 0.538474 USD \n", + "90 E48ds v4 Low Priority 2.551000 USD \n", + "92 D64ds v4 Low Priority 0.723000 USD \n", + "94 E8-2ds v4 Spot 0.184710 USD \n", + "96 Standard_D2ds_v5 0.272000 USD \n", + "97 Standard_D48s_v5 Low Priority 1.949000 USD \n", + "99 M192idms_v2 40.896000 USD \n", + "\n", + " serviceName serviceFamily reservationTerm type \n", + "1 Virtual Machines Compute NA Consumption \n", + "3 Virtual Machines Compute NA Consumption \n", + "4 Virtual Machines Compute NA Consumption \n", + "6 Virtual Machines Compute NA Consumption \n", + "7 Virtual Machines Compute NA Consumption \n", + "8 Virtual Machines Compute NA Consumption \n", + "9 Virtual Machines Compute NA Consumption \n", + "12 Virtual Machines Compute NA Consumption \n", + "13 Virtual Machines Compute NA Consumption \n", + "14 Virtual Machines Compute NA Consumption \n", + "15 Virtual Machines Compute NA Consumption \n", + "16 Virtual Machines Compute NA Consumption \n", + "17 Virtual Machines Compute NA Consumption \n", + "20 Virtual Machines Compute NA Consumption \n", + "21 Virtual Machines Compute NA Consumption \n", + "23 Virtual Machines Compute NA Consumption \n", + "25 Virtual Machines Compute NA Consumption \n", + "26 Virtual Machines Compute NA Consumption \n", + "27 Virtual Machines Compute NA Consumption \n", + "30 Virtual Machines Compute NA Consumption \n", + "31 Virtual Machines Compute NA Consumption \n", + "32 Virtual Machines Compute NA Consumption \n", + "34 Virtual Machines Compute NA Consumption \n", + "36 Virtual Machines Compute NA Consumption \n", + "37 Virtual Machines Compute NA Consumption \n", + "38 Virtual Machines Compute NA Consumption \n", + "39 Virtual Machines Compute NA Consumption \n", + "42 Virtual Machines Compute NA Consumption \n", + "43 Virtual Machines Compute NA Consumption \n", + "45 Virtual Machines Compute NA Consumption \n", + "47 Virtual Machines Compute NA Consumption \n", + "50 Virtual Machines Compute NA Consumption \n", + "51 Virtual Machines Compute NA Consumption \n", + "54 Virtual Machines Compute NA Consumption \n", + "55 Virtual Machines Compute NA Consumption \n", + "59 Virtual Machines Compute NA Consumption \n", + "60 Virtual Machines Compute NA Consumption \n", + "62 Virtual Machines Compute NA Consumption \n", + "63 Virtual Machines Compute NA Consumption \n", + "66 Virtual Machines Compute NA Consumption \n", + "67 Virtual Machines Compute NA Consumption \n", + "68 Virtual Machines Compute NA Consumption \n", + "69 Virtual Machines Compute NA Consumption \n", + "71 Virtual Machines Compute NA Consumption \n", + "72 Virtual Machines Compute NA Consumption \n", + "74 Virtual Machines Compute NA Consumption \n", + "78 Virtual Machines Compute NA Consumption \n", + "79 Virtual Machines Compute NA Consumption \n", + "80 Virtual Machines Compute NA Consumption \n", + "81 Virtual Machines Compute NA Consumption \n", + "83 Virtual Machines Compute NA Consumption \n", + "85 Virtual Machines Compute NA Consumption \n", + "86 Virtual Machines Compute NA Consumption \n", + "88 Virtual Machines Compute NA Consumption \n", + "90 Virtual Machines Compute NA Consumption \n", + "92 Virtual Machines Compute NA Consumption \n", + "94 Virtual Machines Compute NA Consumption \n", + "96 Virtual Machines Compute NA Consumption \n", + "97 Virtual Machines Compute NA Consumption \n", + "99 Virtual Machines Compute NA Consumption " ] }, - "execution_count": 91, + "execution_count": 56, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "dfi_s=dfi_normalize[[\"armRegionName\",\"productName\",\"skuName\",\"retailPrice\",\"currencyCode\",\"serviceName\",\"serviceFamily\"]]\n", - "#dfi_s=dfi_normalize[[\"armRegionName\",\"productName\",\"skuName\",\"retailPrice\"]]\n", - "dfi_s\n" + "dfi_consumption = df_consumption[\n", + " [\n", + " \"armRegionName\",\n", + " \"productName\",\n", + " \"skuName\",\n", + " \"retailPrice\",\n", + " \"currencyCode\",\n", + " \"serviceName\",\n", + " \"serviceFamily\",\n", + " \"reservationTerm\",\n", + " \"type\",\n", + " ]\n", + "]\n", + "dfi_consumption" ] }, { "cell_type": "markdown", + "id": "1dc442ce", "metadata": {}, "source": [ "#### Group by columns ('armRegionName','productName','skuName','serviceName','serviceFamily') to get region wise Max Price and Min Price" @@ -1141,11 +2287,12 @@ }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 57, + "id": "5e54c418", "metadata": { "ExecuteTime": { - "end_time": "2022-03-20T03:44:34.280819Z", - "start_time": "2022-03-20T03:44:34.170475Z" + "end_time": "2022-03-29T14:13:15.529778Z", + "start_time": "2022-03-29T14:13:15.401636Z" } }, "outputs": [ @@ -1174,6 +2321,8 @@ " \n", " \n", " \n", + " \n", + " \n", " maxPrice\n", " minPrice\n", " \n", @@ -1183,6 +2332,8 @@ " skuName\n", " serviceName\n", " serviceFamily\n", + " reservationTerm\n", + " type\n", " \n", " \n", " \n", @@ -1194,8 +2345,10 @@ " E8-2ds v4 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.184710\n", " 0.184710\n", - " 0.069600\n", " \n", " \n", " australiacentral2\n", @@ -1203,6 +2356,8 @@ " E48s v5 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 1.449600\n", " 1.449600\n", " \n", @@ -1212,8 +2367,10 @@ " E64-16s v4 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 2.057530\n", " 2.057530\n", - " 0.852365\n", " \n", " \n", " australiasoutheast\n", @@ -1221,16 +2378,20 @@ " E16-8ads v5 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.537088\n", " 0.537088\n", - " 0.435840\n", " \n", " \n", " Virtual Machines F Series Windows\n", " F16 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.403024\n", " 0.403024\n", - " 0.157550\n", " \n", " \n", " brazilsouth\n", @@ -1238,6 +2399,8 @@ " A2\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.112000\n", " 0.112000\n", " \n", @@ -1246,8 +2409,10 @@ " M416s v2 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 17.373000\n", " 17.373000\n", - " 9.668100\n", " \n", " \n", " canadacentral\n", @@ -1255,24 +2420,30 @@ " D13 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.456000\n", " 0.456000\n", - " 0.155000\n", " \n", " \n", " Virtual Machines DS Series Windows\n", " DS13 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.456000\n", " 0.456000\n", - " 0.155000\n", " \n", " \n", " Virtual Machines Edsv4 Series Windows\n", " E20ds v4 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 1.000000\n", " 1.000000\n", - " 0.316000\n", " \n", " \n", " canadaeast\n", @@ -1280,6 +2451,8 @@ " E4-2s v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.055200\n", " 0.055200\n", " \n", @@ -1287,6 +2460,8 @@ " E4s v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.055200\n", " 0.055200\n", " \n", @@ -1296,14 +2471,18 @@ " A3 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.054000\n", " 0.054000\n", - " 0.030648\n", " \n", " \n", " Virtual Machines Esv4 Series\n", " E8-2s v4 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.114000\n", " 0.114000\n", " \n", @@ -1313,8 +2492,10 @@ " Standard_D64s_v5 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 1.468006\n", " 1.468006\n", - " 0.865075\n", " \n", " \n", " eastus\n", @@ -1322,6 +2503,8 @@ " Standard_DC8as_v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.108000\n", " 0.108000\n", " \n", @@ -1331,14 +2514,18 @@ " Standard_D16s_v5\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 1.504000\n", " 1.504000\n", - " 0.768000\n", " \n", " \n", " Virtual Machines Eadsv5 Series\n", " E8-4ads v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.105000\n", " 0.105000\n", " \n", @@ -1347,8 +2534,10 @@ " M192idms_v2\n", " Virtual Machines\n", " Compute\n", - " 32.064000\n", - " 32.064000\n", + " NA\n", + " Consumption\n", + " 40.896000\n", + " 40.896000\n", " \n", " \n", " japaneast\n", @@ -1356,14 +2545,18 @@ " A3\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.424000\n", " 0.424000\n", - " 0.324000\n", " \n", " \n", " Virtual Machines Edsv5 Series\n", " E104ids v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 1.991000\n", " 1.991000\n", " \n", @@ -1372,6 +2565,8 @@ " Standard_E20d_v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.348000\n", " 0.348000\n", " \n", @@ -1381,16 +2576,20 @@ " Standard_D16ds_v5 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.389939\n", " 0.389939\n", - " 0.239206\n", " \n", " \n", " Virtual Machines Esv4 Series Windows\n", " E64s v4\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 8.294000\n", " 8.294000\n", - " 5.350000\n", " \n", " \n", " koreasouth\n", @@ -1398,7 +2597,9 @@ " Easv4 Type2\n", " Virtual Machines\n", " Compute\n", - " 77890.000000\n", + " NA\n", + " Consumption\n", + " 7.603000\n", " 7.603000\n", " \n", " \n", @@ -1406,8 +2607,10 @@ " Standard_D96_v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 3.886000\n", " 3.886000\n", - " 1.060000\n", " \n", " \n", " northcentralus\n", @@ -1415,6 +2618,8 @@ " DS14 v2\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 1.482000\n", " 1.482000\n", " \n", @@ -1423,6 +2628,8 @@ " D14 v2\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 1.482000\n", " 1.482000\n", " \n", @@ -1432,6 +2639,8 @@ " E2s v5 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.036547\n", " 0.036547\n", " \n", @@ -1440,7 +2649,9 @@ " Standard_E96_v5\n", " Virtual Machines\n", " Compute\n", - " 67588.000000\n", + " NA\n", + " Consumption\n", + " 6.768000\n", " 6.768000\n", " \n", " \n", @@ -1449,6 +2660,8 @@ " E20s v3 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.420000\n", " 0.420000\n", " \n", @@ -1457,14 +2670,18 @@ " E16ds v4 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.538474\n", " 0.538474\n", - " 0.196983\n", " \n", " \n", " Virtual Machines Ev3 Series\n", " E20 v3 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.420000\n", " 0.420000\n", " \n", @@ -1474,7 +2691,9 @@ " E64 v4\n", " Virtual Machines\n", " Compute\n", - " 48318.000000\n", + " NA\n", + " Consumption\n", + " 4.838000\n", " 4.838000\n", " \n", " \n", @@ -1483,6 +2702,8 @@ " HC44-32rs Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.411800\n", " 0.411800\n", " \n", @@ -1492,14 +2713,18 @@ " D14 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.542506\n", " 0.542506\n", - " 0.262752\n", " \n", " \n", " Virtual Machines Dv2 Series\n", " D5 v2 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.181440\n", " 0.181440\n", " \n", @@ -1508,8 +2733,10 @@ " M128 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 10.440000\n", " 10.440000\n", - " 4.041000\n", " \n", " \n", " switzerlandnorth\n", @@ -1517,8 +2744,10 @@ " Standard_D4ds_v5\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.483000\n", " 0.483000\n", - " 0.150000\n", " \n", " \n", " uaecentral\n", @@ -1526,14 +2755,18 @@ " Standard_D2ds_v5\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.272000\n", " 0.272000\n", - " 0.180000\n", " \n", " \n", " Virtual Machines Ev4 Series\n", " E16 v4 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.157200\n", " 0.157200\n", " \n", @@ -1541,6 +2774,8 @@ " E32 v4 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.314500\n", " 0.314500\n", " \n", @@ -1550,8 +2785,10 @@ " D16s v3 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.338691\n", " 0.338691\n", - " 0.129024\n", " \n", " \n", " uknorth\n", @@ -1559,16 +2796,20 @@ " A3 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.190000\n", " 0.190000\n", - " 0.062988\n", " \n", " \n", " Virtual Machines Ev3 Series Windows\n", " E64 v3 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 3.224400\n", " 3.224400\n", - " 1.022888\n", " \n", " \n", " uksouth\n", @@ -1576,8 +2817,10 @@ " Standard_D48s_v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 1.949000\n", " 1.949000\n", - " 0.533000\n", " \n", " \n", " usgovarizona\n", @@ -1585,7 +2828,9 @@ " D64s v4\n", " Virtual Machines\n", " Compute\n", - " 38667.000000\n", + " NA\n", + " Consumption\n", + " 3.872000\n", " 3.872000\n", " \n", " \n", @@ -1593,6 +2838,8 @@ " NV4as v4 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.039110\n", " 0.039110\n", " \n", @@ -1602,6 +2849,8 @@ " F16s Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.341510\n", " 0.341510\n", " \n", @@ -1611,15 +2860,19 @@ " E4-2ds v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.212000\n", " 0.212000\n", - " 0.069100\n", " \n", " \n", " E4ds v5 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.212000\n", " 0.212000\n", - " 0.069100\n", " \n", " \n", " westeurope\n", @@ -1627,8 +2880,10 @@ " F16s Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", + " 0.571308\n", " 0.571308\n", - " 0.210434\n", " \n", " \n", " westindia\n", @@ -1636,6 +2891,8 @@ " DS4 v2 Spot\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.090720\n", " 0.090720\n", " \n", @@ -1644,6 +2901,8 @@ " D2 v4 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 0.023600\n", " 0.023600\n", " \n", @@ -1652,211 +2911,618 @@ " E48ds v4 Low Priority\n", " Virtual Machines\n", " Compute\n", + " NA\n", + " Consumption\n", " 2.551000\n", - " 0.834000\n", + " 2.551000\n", + " \n", + " \n", + " westus\n", + " Virtual Machines Ebdsv5 Series\n", + " Standard_E2bds_v5 Spot\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " 0.075600\n", + " 0.075600\n", + " \n", + " \n", + " westus2\n", + " Virtual Machines Ddsv4 Series\n", + " D64ds v4 Low Priority\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " 0.723000\n", + " 0.723000\n", + " \n", + " \n", + " Virtual Machines Ddsv5 Series\n", + " Standard_D64ds_v5\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " 3.616000\n", + " 3.616000\n", + " \n", + " \n", + " Virtual Machines ESv3 Series Windows\n", + " E48s v3 Low Priority\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " 2.093000\n", + " 2.093000\n", + " \n", + " \n", + " Virtual Machines Ev3 Series Windows\n", + " E48 v3 Low Priority\n", + " Virtual Machines\n", + " Compute\n", + " NA\n", + " Consumption\n", + " 2.093000\n", + " 2.093000\n", + " \n", + " \n", + "\n", + "" + ], + "text/plain": [ + " maxPrice \\\n", + "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", + "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute NA Consumption 0.184710 \n", + "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute NA Consumption 1.449600 \n", + "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute NA Consumption 2.057530 \n", + "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute NA Consumption 0.537088 \n", + " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute NA Consumption 0.403024 \n", + "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute NA Consumption 0.112000 \n", + " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute NA Consumption 17.373000 \n", + "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", + " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", + " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute NA Consumption 1.000000 \n", + "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", + " E4s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", + "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.054000 \n", + " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute NA Consumption 0.114000 \n", + "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute NA Consumption 1.468006 \n", + "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute NA Consumption 0.108000 \n", + "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute NA Consumption 1.504000 \n", + " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute NA Consumption 0.105000 \n", + " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute NA Consumption 40.896000 \n", + "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute NA Consumption 0.424000 \n", + " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute NA Consumption 1.991000 \n", + " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute NA Consumption 0.348000 \n", + "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute NA Consumption 0.389939 \n", + " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute NA Consumption 8.294000 \n", + "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute NA Consumption 7.603000 \n", + " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute NA Consumption 3.886000 \n", + "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", + " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", + "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute NA Consumption 0.036547 \n", + " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute NA Consumption 6.768000 \n", + "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", + " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute NA Consumption 0.538474 \n", + " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", + "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute NA Consumption 4.838000 \n", + "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute NA Consumption 0.411800 \n", + "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute NA Consumption 0.542506 \n", + " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute NA Consumption 0.181440 \n", + " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute NA Consumption 10.440000 \n", + "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute NA Consumption 0.483000 \n", + "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute NA Consumption 0.272000 \n", + " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute NA Consumption 0.157200 \n", + " E32 v4 Spot Virtual Machines Compute NA Consumption 0.314500 \n", + "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute NA Consumption 0.338691 \n", + "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.190000 \n", + " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute NA Consumption 3.224400 \n", + "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute NA Consumption 1.949000 \n", + "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute NA Consumption 3.872000 \n", + " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute NA Consumption 0.039110 \n", + "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.341510 \n", + "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", + " E4ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", + "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.571308 \n", + "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute NA Consumption 0.090720 \n", + " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute NA Consumption 0.023600 \n", + " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute NA Consumption 2.551000 \n", + "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute NA Consumption 0.075600 \n", + "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute NA Consumption 0.723000 \n", + " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute NA Consumption 3.616000 \n", + " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 \n", + " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 \n", + "\n", + " minPrice \n", + "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", + "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute NA Consumption 0.184710 \n", + "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute NA Consumption 1.449600 \n", + "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute NA Consumption 2.057530 \n", + "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute NA Consumption 0.537088 \n", + " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute NA Consumption 0.403024 \n", + "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute NA Consumption 0.112000 \n", + " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute NA Consumption 17.373000 \n", + "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", + " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", + " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute NA Consumption 1.000000 \n", + "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", + " E4s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", + "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.054000 \n", + " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute NA Consumption 0.114000 \n", + "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute NA Consumption 1.468006 \n", + "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute NA Consumption 0.108000 \n", + "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute NA Consumption 1.504000 \n", + " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute NA Consumption 0.105000 \n", + " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute NA Consumption 40.896000 \n", + "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute NA Consumption 0.424000 \n", + " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute NA Consumption 1.991000 \n", + " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute NA Consumption 0.348000 \n", + "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute NA Consumption 0.389939 \n", + " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute NA Consumption 8.294000 \n", + "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute NA Consumption 7.603000 \n", + " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute NA Consumption 3.886000 \n", + "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", + " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", + "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute NA Consumption 0.036547 \n", + " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute NA Consumption 6.768000 \n", + "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", + " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute NA Consumption 0.538474 \n", + " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", + "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute NA Consumption 4.838000 \n", + "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute NA Consumption 0.411800 \n", + "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute NA Consumption 0.542506 \n", + " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute NA Consumption 0.181440 \n", + " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute NA Consumption 10.440000 \n", + "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute NA Consumption 0.483000 \n", + "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute NA Consumption 0.272000 \n", + " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute NA Consumption 0.157200 \n", + " E32 v4 Spot Virtual Machines Compute NA Consumption 0.314500 \n", + "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute NA Consumption 0.338691 \n", + "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.190000 \n", + " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute NA Consumption 3.224400 \n", + "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute NA Consumption 1.949000 \n", + "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute NA Consumption 3.872000 \n", + " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute NA Consumption 0.039110 \n", + "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.341510 \n", + "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", + " E4ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", + "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.571308 \n", + "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute NA Consumption 0.090720 \n", + " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute NA Consumption 0.023600 \n", + " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute NA Consumption 2.551000 \n", + "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute NA Consumption 0.075600 \n", + "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute NA Consumption 0.723000 \n", + " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute NA Consumption 3.616000 \n", + " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 \n", + " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 " + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result_consumption = dfi_consumption.groupby(\n", + " [\n", + " \"armRegionName\",\n", + " \"productName\",\n", + " \"skuName\",\n", + " \"serviceName\",\n", + " \"serviceFamily\",\n", + " \"reservationTerm\",\n", + " \"type\",\n", + " ]\n", + ").agg(maxPrice=(\"retailPrice\", \"max\"), minPrice=(\"retailPrice\", \"min\"))\n", + "result_consumption" + ] + }, + { + "cell_type": "markdown", + "id": "00a78df4", + "metadata": {}, + "source": [ + "#### Data analysis to understand service prices for type Reservation" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "id": "a000bb41", + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-29T14:13:23.371779Z", + "start_time": "2022-03-29T14:13:23.269772Z" + } + }, + "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", + " \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", + " \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", + " \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", + " \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", - " \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", - " \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", - " \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", - " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
currencyCodetierMinimumUnitsretailPriceunitPricearmRegionNamelocationeffectiveStartDateeffectiveEndDatemeterIdmeterName...productNameskuNameserviceNameserviceIdserviceFamilyunitOfMeasuretypeisPrimaryMeterRegionarmSkuNamereservationTerm
22USD0.018689.018689.0westus2US West 22021-11-01T00:00:00ZNA000aeefc-dae5-5264-8f64-d0838e160478D64ds v5...Virtual Machines Ddsv5 SeriesStandard_D64ds_v5Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_D64ds_v51 Year
24USD0.036111.036111.0westus2US West 22021-11-01T00:00:00ZNA000aeefc-dae5-5264-8f64-d0838e160478D64ds v5...Virtual Machines Ddsv5 SeriesStandard_D64ds_v5Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_D64ds_v53 Years
28USD0.077890.077890.0koreasouthKR South2021-12-01T00:00:00ZNA000c0948-0687-52ed-8efa-32a3cfa6c9edEasv4 Type2...Easv4 Series Dedicated HostEasv4 Type2Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueEasv4_Type23 Years
29USD0.039231.039231.0koreasouthKR South2021-12-01T00:00:00ZNA000c0948-0687-52ed-8efa-32a3cfa6c9edEasv4 Type2...Easv4 Series Dedicated HostEasv4 Type2Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueEasv4_Type21 Year
46USD0.020012.020012.0usgovarizonaUS Gov AZ2020-08-01T00:00:00ZNA0014a546-6717-582f-9680-e510e91eae91D64s v4...Virtual Machines Dsv4 SeriesD64s v4Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_D64s_v41 Year
westusVirtual Machines Ebdsv5 SeriesStandard_E2bds_v5 SpotVirtual MachinesCompute0.0756000.07560048USD0.038667.038667.0usgovarizonaUS Gov AZ2020-08-01T00:00:00ZNA0014a546-6717-582f-9680-e510e91eae91D64s v4...Virtual Machines Dsv4 SeriesD64s v4Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_D64s_v43 Years
westus2Virtual Machines Ddsv4 SeriesD64ds v4 Low PriorityVirtual MachinesCompute0.7230000.72300056USD0.048318.048318.0southcentralusUS South Central2020-08-01T00:00:00ZNA0016083a-928f-56fd-8eeb-39287dcf676dE64 v4...Virtual Machines Ev4 SeriesE64 v4Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_E64_v43 Years
Virtual Machines Ddsv5 SeriesStandard_D64ds_v5Virtual MachinesCompute36111.0000003.61600057USD0.025007.025007.0southcentralusUS South Central2020-08-01T00:00:00ZNA0016083a-928f-56fd-8eeb-39287dcf676dE64 v4...Virtual Machines Ev4 SeriesE64 v4Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_E64_v41 Year
Virtual Machines ESv3 Series WindowsE48s v3 Low PriorityVirtual MachinesCompute2.0930000.60500075USD0.034980.034980.0northeuropeEU North2021-11-01T00:00:00ZNA001a6f90-bc8f-572e-b7bc-f95af3413781E96 v5...Virtual Machines Ev5 SeriesStandard_E96_v5Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_E96_v51 Year
Virtual Machines Ev3 Series WindowsE48 v3 Low PriorityVirtual MachinesCompute2.0930000.60500076USD0.067588.067588.0northeuropeEU North2021-11-01T00:00:00ZNA001a6f90-bc8f-572e-b7bc-f95af3413781E96 v5...Virtual Machines Ev5 SeriesStandard_E96_v5Virtual MachinesDZH313Z7MMC8Compute1 HourReservationTrueStandard_E96_v53 Years
\n", + "

10 rows × 22 columns

\n", "
" ], "text/plain": [ - " maxPrice \\\n", - "armRegionName productName skuName serviceName serviceFamily \n", - "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute 0.184710 \n", - "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute 1.449600 \n", - "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute 2.057530 \n", - "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute 0.537088 \n", - " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute 0.403024 \n", - "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute 0.112000 \n", - " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute 17.373000 \n", - "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute 0.456000 \n", - " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute 0.456000 \n", - " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute 1.000000 \n", - "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute 0.055200 \n", - " E4s v5 Low Priority Virtual Machines Compute 0.055200 \n", - "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.054000 \n", - " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute 0.114000 \n", - "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute 1.468006 \n", - "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute 0.108000 \n", - "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute 1.504000 \n", - " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute 0.105000 \n", - " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute 32.064000 \n", - "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute 0.424000 \n", - " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute 1.991000 \n", - " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute 0.348000 \n", - "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute 0.389939 \n", - " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute 8.294000 \n", - "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 77890.000000 \n", - " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute 3.886000 \n", - "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute 1.482000 \n", - " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute 1.482000 \n", - "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute 0.036547 \n", - " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 67588.000000 \n", - "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute 0.420000 \n", - " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute 0.538474 \n", - " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute 0.420000 \n", - "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 48318.000000 \n", - "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute 0.411800 \n", - "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute 0.542506 \n", - " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute 0.181440 \n", - " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute 10.440000 \n", - "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute 0.483000 \n", - "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute 0.272000 \n", - " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute 0.157200 \n", - " E32 v4 Spot Virtual Machines Compute 0.314500 \n", - "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute 0.338691 \n", - "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.190000 \n", - " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute 3.224400 \n", - "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute 1.949000 \n", - "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 38667.000000 \n", - " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute 0.039110 \n", - "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.341510 \n", - "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute 0.212000 \n", - " E4ds v5 Low Priority Virtual Machines Compute 0.212000 \n", - "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.571308 \n", - "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute 0.090720 \n", - " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute 0.023600 \n", - " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute 2.551000 \n", - "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute 0.075600 \n", - "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute 0.723000 \n", - " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute 36111.000000 \n", - " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute 2.093000 \n", - " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute 2.093000 \n", + " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", + "22 USD 0.0 18689.0 18689.0 westus2 \n", + "24 USD 0.0 36111.0 36111.0 westus2 \n", + "28 USD 0.0 77890.0 77890.0 koreasouth \n", + "29 USD 0.0 39231.0 39231.0 koreasouth \n", + "46 USD 0.0 20012.0 20012.0 usgovarizona \n", + "48 USD 0.0 38667.0 38667.0 usgovarizona \n", + "56 USD 0.0 48318.0 48318.0 southcentralus \n", + "57 USD 0.0 25007.0 25007.0 southcentralus \n", + "75 USD 0.0 34980.0 34980.0 northeurope \n", + "76 USD 0.0 67588.0 67588.0 northeurope \n", + "\n", + " location effectiveStartDate effectiveEndDate \\\n", + "22 US West 2 2021-11-01T00:00:00Z NA \n", + "24 US West 2 2021-11-01T00:00:00Z NA \n", + "28 KR South 2021-12-01T00:00:00Z NA \n", + "29 KR South 2021-12-01T00:00:00Z NA \n", + "46 US Gov AZ 2020-08-01T00:00:00Z NA \n", + "48 US Gov AZ 2020-08-01T00:00:00Z NA \n", + "56 US South Central 2020-08-01T00:00:00Z NA \n", + "57 US South Central 2020-08-01T00:00:00Z NA \n", + "75 EU North 2021-11-01T00:00:00Z NA \n", + "76 EU North 2021-11-01T00:00:00Z NA \n", + "\n", + " meterId meterName ... \\\n", + "22 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", + "24 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", + "28 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", + "29 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", + "46 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", + "48 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", + "56 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", + "57 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", + "75 001a6f90-bc8f-572e-b7bc-f95af3413781 E96 v5 ... \n", + "76 001a6f90-bc8f-572e-b7bc-f95af3413781 E96 v5 ... \n", + "\n", + " productName skuName serviceName \\\n", + "22 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines \n", + "24 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines \n", + "28 Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines \n", + "29 Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines \n", + "46 Virtual Machines Dsv4 Series D64s v4 Virtual Machines \n", + "48 Virtual Machines Dsv4 Series D64s v4 Virtual Machines \n", + "56 Virtual Machines Ev4 Series E64 v4 Virtual Machines \n", + "57 Virtual Machines Ev4 Series E64 v4 Virtual Machines \n", + "75 Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines \n", + "76 Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines \n", + "\n", + " serviceId serviceFamily unitOfMeasure type \\\n", + "22 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "24 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "28 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "29 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "46 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "48 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "56 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "57 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "75 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "76 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "\n", + " isPrimaryMeterRegion armSkuName reservationTerm \n", + "22 True Standard_D64ds_v5 1 Year \n", + "24 True Standard_D64ds_v5 3 Years \n", + "28 True Easv4_Type2 3 Years \n", + "29 True Easv4_Type2 1 Year \n", + "46 True Standard_D64s_v4 1 Year \n", + "48 True Standard_D64s_v4 3 Years \n", + "56 True Standard_E64_v4 3 Years \n", + "57 True Standard_E64_v4 1 Year \n", + "75 True Standard_E96_v5 1 Year \n", + "76 True Standard_E96_v5 3 Years \n", "\n", - " minPrice \n", - "armRegionName productName skuName serviceName serviceFamily \n", - "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute 0.069600 \n", - "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute 1.449600 \n", - "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute 0.852365 \n", - "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute 0.435840 \n", - " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute 0.157550 \n", - "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute 0.112000 \n", - " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute 9.668100 \n", - "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute 0.155000 \n", - " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute 0.155000 \n", - " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute 0.316000 \n", - "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute 0.055200 \n", - " E4s v5 Low Priority Virtual Machines Compute 0.055200 \n", - "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.030648 \n", - " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute 0.114000 \n", - "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute 0.865075 \n", - "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute 0.108000 \n", - "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute 0.768000 \n", - " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute 0.105000 \n", - " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute 32.064000 \n", - "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute 0.324000 \n", - " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute 1.991000 \n", - " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute 0.348000 \n", - "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute 0.239206 \n", - " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute 5.350000 \n", - "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 7.603000 \n", - " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute 1.060000 \n", - "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute 1.482000 \n", - " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute 1.482000 \n", - "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute 0.036547 \n", - " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 6.768000 \n", - "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute 0.420000 \n", - " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute 0.196983 \n", - " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute 0.420000 \n", - "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 4.838000 \n", - "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute 0.411800 \n", - "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute 0.262752 \n", - " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute 0.181440 \n", - " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute 4.041000 \n", - "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute 0.150000 \n", - "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute 0.180000 \n", - " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute 0.157200 \n", - " E32 v4 Spot Virtual Machines Compute 0.314500 \n", - "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute 0.129024 \n", - "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute 0.062988 \n", - " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute 1.022888 \n", - "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute 0.533000 \n", - "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 3.872000 \n", - " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute 0.039110 \n", - "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.341510 \n", - "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute 0.069100 \n", - " E4ds v5 Low Priority Virtual Machines Compute 0.069100 \n", - "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute 0.210434 \n", - "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute 0.090720 \n", - " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute 0.023600 \n", - " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute 0.834000 \n", - "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute 0.075600 \n", - "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute 0.723000 \n", - " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute 3.616000 \n", - " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute 0.605000 \n", - " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute 0.605000 " + "[10 rows x 22 columns]" ] }, - "execution_count": 93, + "execution_count": 58, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "#data = dfi_s.groupby('productName').transform(lambda x: (x - x.min()) / x.max()- x.min())\n", - "#grouper = dfi_s.groupby(['armRegionName','productName','skuName'])['retailPrice'].agg(['max','min'])\n", - "result = dfi_s.groupby(['armRegionName','productName','skuName','serviceName','serviceFamily']).agg(\n", - " maxPrice=('retailPrice','max'),minPrice=('retailPrice','min'))\n", - "\n", - "result\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Data analysis to understand service prices above 5000 USD" + "df_reservation = df_items_2.loc[(df_items_2[\"type\"] == \"Reservation\")]\n", + "df_reservation" ] }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 59, + "id": "dac92fe8", "metadata": { "ExecuteTime": { - "end_time": "2022-03-19T07:27:10.782017Z", - "start_time": "2022-03-19T07:27:10.743135Z" + "end_time": "2022-03-29T14:13:28.301798Z", + "start_time": "2022-03-29T14:13:28.241674Z" } }, "outputs": [ @@ -1883,10 +3549,13 @@ " \n", " armRegionName\n", " productName\n", + " skuName\n", " retailPrice\n", " currencyCode\n", " serviceName\n", " serviceFamily\n", + " reservationTerm\n", + " type\n", " \n", " \n", " \n", @@ -1894,138 +3563,393 @@ " 22\n", " westus2\n", " Virtual Machines Ddsv5 Series\n", - " 36111.0\n", + " Standard_D64ds_v5\n", + " 18689.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 1 Year\n", + " Reservation\n", " \n", " \n", - " 23\n", + " 24\n", " westus2\n", " Virtual Machines Ddsv5 Series\n", - " 18689.0\n", + " Standard_D64ds_v5\n", + " 36111.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 3 Years\n", + " Reservation\n", " \n", " \n", " 28\n", " koreasouth\n", " Easv4 Series Dedicated Host\n", + " Easv4 Type2\n", " 77890.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 3 Years\n", + " Reservation\n", " \n", " \n", " 29\n", " koreasouth\n", " Easv4 Series Dedicated Host\n", + " Easv4 Type2\n", " 39231.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 1 Year\n", + " Reservation\n", " \n", " \n", - " 47\n", + " 46\n", " usgovarizona\n", " Virtual Machines Dsv4 Series\n", - " 38667.0\n", + " D64s v4\n", + " 20012.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 1 Year\n", + " Reservation\n", " \n", " \n", " 48\n", " usgovarizona\n", " Virtual Machines Dsv4 Series\n", - " 20012.0\n", + " D64s v4\n", + " 38667.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 3 Years\n", + " Reservation\n", " \n", " \n", " 56\n", " southcentralus\n", " Virtual Machines Ev4 Series\n", + " E64 v4\n", " 48318.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 3 Years\n", + " Reservation\n", " \n", " \n", " 57\n", " southcentralus\n", " Virtual Machines Ev4 Series\n", + " E64 v4\n", " 25007.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 1 Year\n", + " Reservation\n", " \n", " \n", - " 74\n", + " 75\n", " northeurope\n", " Virtual Machines Ev5 Series\n", - " 67588.0\n", + " Standard_E96_v5\n", + " 34980.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 1 Year\n", + " Reservation\n", " \n", " \n", " 76\n", " northeurope\n", " Virtual Machines Ev5 Series\n", - " 34980.0\n", + " Standard_E96_v5\n", + " 67588.0\n", " USD\n", " Virtual Machines\n", " Compute\n", + " 3 Years\n", + " Reservation\n", " \n", " \n", "\n", "" ], "text/plain": [ - " armRegionName productName retailPrice currencyCode \\\n", - "22 westus2 Virtual Machines Ddsv5 Series 36111.0 USD \n", - "23 westus2 Virtual Machines Ddsv5 Series 18689.0 USD \n", - "28 koreasouth Easv4 Series Dedicated Host 77890.0 USD \n", - "29 koreasouth Easv4 Series Dedicated Host 39231.0 USD \n", - "47 usgovarizona Virtual Machines Dsv4 Series 38667.0 USD \n", - "48 usgovarizona Virtual Machines Dsv4 Series 20012.0 USD \n", - "56 southcentralus Virtual Machines Ev4 Series 48318.0 USD \n", - "57 southcentralus Virtual Machines Ev4 Series 25007.0 USD \n", - "74 northeurope Virtual Machines Ev5 Series 67588.0 USD \n", - "76 northeurope Virtual Machines Ev5 Series 34980.0 USD \n", + " armRegionName productName skuName \\\n", + "22 westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", + "24 westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", + "28 koreasouth Easv4 Series Dedicated Host Easv4 Type2 \n", + "29 koreasouth Easv4 Series Dedicated Host Easv4 Type2 \n", + "46 usgovarizona Virtual Machines Dsv4 Series D64s v4 \n", + "48 usgovarizona Virtual Machines Dsv4 Series D64s v4 \n", + "56 southcentralus Virtual Machines Ev4 Series E64 v4 \n", + "57 southcentralus Virtual Machines Ev4 Series E64 v4 \n", + "75 northeurope Virtual Machines Ev5 Series Standard_E96_v5 \n", + "76 northeurope Virtual Machines Ev5 Series Standard_E96_v5 \n", + "\n", + " retailPrice currencyCode serviceName serviceFamily reservationTerm \\\n", + "22 18689.0 USD Virtual Machines Compute 1 Year \n", + "24 36111.0 USD Virtual Machines Compute 3 Years \n", + "28 77890.0 USD Virtual Machines Compute 3 Years \n", + "29 39231.0 USD Virtual Machines Compute 1 Year \n", + "46 20012.0 USD Virtual Machines Compute 1 Year \n", + "48 38667.0 USD Virtual Machines Compute 3 Years \n", + "56 48318.0 USD Virtual Machines Compute 3 Years \n", + "57 25007.0 USD Virtual Machines Compute 1 Year \n", + "75 34980.0 USD Virtual Machines Compute 1 Year \n", + "76 67588.0 USD Virtual Machines Compute 3 Years \n", "\n", - " serviceName serviceFamily \n", - "22 Virtual Machines Compute \n", - "23 Virtual Machines Compute \n", - "28 Virtual Machines Compute \n", - "29 Virtual Machines Compute \n", - "47 Virtual Machines Compute \n", - "48 Virtual Machines Compute \n", - "56 Virtual Machines Compute \n", - "57 Virtual Machines Compute \n", - "74 Virtual Machines Compute \n", - "76 Virtual Machines Compute " + " type \n", + "22 Reservation \n", + "24 Reservation \n", + "28 Reservation \n", + "29 Reservation \n", + "46 Reservation \n", + "48 Reservation \n", + "56 Reservation \n", + "57 Reservation \n", + "75 Reservation \n", + "76 Reservation " ] }, - "execution_count": 22, + "execution_count": 59, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "high_price= dfi_s[dfi_s[\"retailPrice\"] > 5000 ]\n", - "high_price" + "dfi_reservation = df_reservation[\n", + " [\n", + " \"armRegionName\",\n", + " \"productName\",\n", + " \"skuName\",\n", + " \"retailPrice\",\n", + " \"currencyCode\",\n", + " \"serviceName\",\n", + " \"serviceFamily\",\n", + " \"reservationTerm\",\n", + " \"type\",\n", + " ]\n", + "]\n", + "dfi_reservation" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] + "execution_count": 60, + "id": "555a00f8", + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-29T14:13:35.959811Z", + "start_time": "2022-03-29T14:13:35.881394Z" + }, + "scrolled": true + }, + "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", + " \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", + " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
maxPriceminPrice
armRegionNameproductNameskuNameserviceNameserviceFamilyreservationTermtype
koreasouthEasv4 Series Dedicated HostEasv4 Type2Virtual MachinesCompute1 YearReservation39231.039231.0
3 YearsReservation77890.077890.0
northeuropeVirtual Machines Ev5 SeriesStandard_E96_v5Virtual MachinesCompute1 YearReservation34980.034980.0
3 YearsReservation67588.067588.0
southcentralusVirtual Machines Ev4 SeriesE64 v4Virtual MachinesCompute1 YearReservation25007.025007.0
3 YearsReservation48318.048318.0
usgovarizonaVirtual Machines Dsv4 SeriesD64s v4Virtual MachinesCompute1 YearReservation20012.020012.0
3 YearsReservation38667.038667.0
westus2Virtual Machines Ddsv5 SeriesStandard_D64ds_v5Virtual MachinesCompute1 YearReservation18689.018689.0
3 YearsReservation36111.036111.0
\n", + "
" + ], + "text/plain": [ + " maxPrice \\\n", + "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", + "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 1 Year Reservation 39231.0 \n", + " 3 Years Reservation 77890.0 \n", + "northeurope Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 1 Year Reservation 34980.0 \n", + " 3 Years Reservation 67588.0 \n", + "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 1 Year Reservation 25007.0 \n", + " 3 Years Reservation 48318.0 \n", + "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 1 Year Reservation 20012.0 \n", + " 3 Years Reservation 38667.0 \n", + "westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute 1 Year Reservation 18689.0 \n", + " 3 Years Reservation 36111.0 \n", + "\n", + " minPrice \n", + "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", + "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 1 Year Reservation 39231.0 \n", + " 3 Years Reservation 77890.0 \n", + "northeurope Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 1 Year Reservation 34980.0 \n", + " 3 Years Reservation 67588.0 \n", + "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 1 Year Reservation 25007.0 \n", + " 3 Years Reservation 48318.0 \n", + "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 1 Year Reservation 20012.0 \n", + " 3 Years Reservation 38667.0 \n", + "westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute 1 Year Reservation 18689.0 \n", + " 3 Years Reservation 36111.0 " + ] + }, + "execution_count": 60, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "result_reservation = dfi_reservation.groupby(\n", + " [\n", + " \"armRegionName\",\n", + " \"productName\",\n", + " \"skuName\",\n", + " \"serviceName\",\n", + " \"serviceFamily\",\n", + " \"reservationTerm\",\n", + " \"type\",\n", + " ]\n", + ").agg(maxPrice=(\"retailPrice\", \"max\"), minPrice=(\"retailPrice\", \"min\"))\n", + "result_reservation" + ] + }, + { + "cell_type": "markdown", + "id": "49613bba", + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-29T13:38:17.721934Z", + "start_time": "2022-03-29T13:38:17.710284Z" + } + }, + "source": [ + "#### Conclusion - \n", + "For the type Consumption In most of the cases across regions, there is slight variation between min and max price\n", + "\n", + "For the type Reservation prices are fixed. Max min price analysis is not required." + ] } ], "metadata": { From fbb6805e7c5a6df69cd1dac66d013c3153e3359f Mon Sep 17 00:00:00 2001 From: Sumedh Patil Date: Tue, 29 Mar 2022 20:02:33 +0530 Subject: [PATCH 3/6] second commit --- .../cloud_price_analysis_azure.ipynb | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/notebooks/experimental/cloud_price_analysis_azure.ipynb b/notebooks/experimental/cloud_price_analysis_azure.ipynb index d2d7cf1..54ca9ef 100644 --- a/notebooks/experimental/cloud_price_analysis_azure.ipynb +++ b/notebooks/experimental/cloud_price_analysis_azure.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2782d5c7", + "id": "972a0932", "metadata": {}, "source": [ "### Analysis of Azure Pricing details \n", @@ -14,7 +14,7 @@ { "cell_type": "code", "execution_count": 61, - "id": "bdbaddda", + "id": "33c36af4", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:19:38.686518Z", @@ -32,7 +32,7 @@ }, { "cell_type": "markdown", - "id": "523468ad", + "id": "de852132", "metadata": {}, "source": [ "#### Access the API end point for 'Vitual Machine' and store JSON file at location ../data/raw/" @@ -41,7 +41,7 @@ { "cell_type": "code", "execution_count": 40, - "id": "955af161", + "id": "34a520bc", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:28.074579Z", @@ -60,7 +60,7 @@ { "cell_type": "code", "execution_count": 41, - "id": "1fccfe1c", + "id": "2627e90f", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:30.701510Z", @@ -182,7 +182,7 @@ }, { "cell_type": "markdown", - "id": "6c5e9c5b", + "id": "fe10c427", "metadata": {}, "source": [ "#### Understand shape of data" @@ -191,7 +191,7 @@ { "cell_type": "code", "execution_count": 42, - "id": "36d5f71e", + "id": "01e44aa2", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:34.211885Z", @@ -321,7 +321,7 @@ }, { "cell_type": "markdown", - "id": "c224e305", + "id": "8b3d8fdb", "metadata": { "ExecuteTime": { "end_time": "2022-03-22T05:57:27.176179Z", @@ -335,7 +335,7 @@ { "cell_type": "code", "execution_count": 43, - "id": "7b2f4bb7", + "id": "4e17920b", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:38.564518Z", @@ -351,7 +351,7 @@ { "cell_type": "code", "execution_count": 51, - "id": "b0f64c41", + "id": "8ff82424", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:12:09.990992Z", @@ -387,7 +387,7 @@ }, { "cell_type": "markdown", - "id": "3a5b47be", + "id": "3a631ed8", "metadata": {}, "source": [ "#### Some times JSON file is missing reservationTerm or sometimes carry the values are 1 Year, 3 Years or onDemand\n", @@ -397,7 +397,7 @@ { "cell_type": "code", "execution_count": 44, - "id": "8806807a", + "id": "aae79f0c", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:43.697103Z", @@ -422,7 +422,7 @@ { "cell_type": "code", "execution_count": 52, - "id": "b33a6daf", + "id": "bb0bc855", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:12:51.483718Z", @@ -851,7 +851,7 @@ }, { "cell_type": "markdown", - "id": "f61b85ed", + "id": "3245dead", "metadata": {}, "source": [ "#### Understand unique type, Typical values are Consumption and Reservation" @@ -860,7 +860,7 @@ { "cell_type": "code", "execution_count": 53, - "id": "6b593eb3", + "id": "512be047", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:12:59.466280Z", @@ -883,7 +883,7 @@ { "cell_type": "code", "execution_count": 54, - "id": "bb957671", + "id": "38bfda5d", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:01.864134Z", @@ -906,7 +906,7 @@ { "cell_type": "code", "execution_count": 55, - "id": "b7f0481c", + "id": "1d6a6793", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:05.125246Z", @@ -1302,7 +1302,7 @@ { "cell_type": "code", "execution_count": 56, - "id": "0cb2987d", + "id": "71e99793", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:11.063715Z", @@ -2279,7 +2279,7 @@ }, { "cell_type": "markdown", - "id": "1dc442ce", + "id": "97670f73", "metadata": {}, "source": [ "#### Group by columns ('armRegionName','productName','skuName','serviceName','serviceFamily') to get region wise Max Price and Min Price" @@ -2288,7 +2288,7 @@ { "cell_type": "code", "execution_count": 57, - "id": "5e54c418", + "id": "1b5615ef", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:15.529778Z", @@ -3122,7 +3122,7 @@ }, { "cell_type": "markdown", - "id": "00a78df4", + "id": "a532eaaa", "metadata": {}, "source": [ "#### Data analysis to understand service prices for type Reservation" @@ -3131,7 +3131,7 @@ { "cell_type": "code", "execution_count": 58, - "id": "a000bb41", + "id": "8669dac3", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:23.371779Z", @@ -3518,7 +3518,7 @@ { "cell_type": "code", "execution_count": 59, - "id": "dac92fe8", + "id": "65957da3", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:28.301798Z", @@ -3746,7 +3746,7 @@ { "cell_type": "code", "execution_count": 60, - "id": "555a00f8", + "id": "a64843ce", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:35.959811Z", @@ -3937,7 +3937,7 @@ }, { "cell_type": "markdown", - "id": "49613bba", + "id": "b43e5c09", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T13:38:17.721934Z", From 20d245832e92298124759e72ea4a99aaecef73a0 Mon Sep 17 00:00:00 2001 From: Sumedh Patil Date: Tue, 29 Mar 2022 20:09:12 +0530 Subject: [PATCH 4/6] second commit --- .../cloud_price_analysis_azure.ipynb | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/notebooks/experimental/cloud_price_analysis_azure.ipynb b/notebooks/experimental/cloud_price_analysis_azure.ipynb index 54ca9ef..ddab119 100644 --- a/notebooks/experimental/cloud_price_analysis_azure.ipynb +++ b/notebooks/experimental/cloud_price_analysis_azure.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "972a0932", + "id": "13568ebc", "metadata": {}, "source": [ "### Analysis of Azure Pricing details \n", @@ -14,7 +14,7 @@ { "cell_type": "code", "execution_count": 61, - "id": "33c36af4", + "id": "ea3b02f4", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:19:38.686518Z", @@ -32,7 +32,7 @@ }, { "cell_type": "markdown", - "id": "de852132", + "id": "da1ef330", "metadata": {}, "source": [ "#### Access the API end point for 'Vitual Machine' and store JSON file at location ../data/raw/" @@ -41,7 +41,7 @@ { "cell_type": "code", "execution_count": 40, - "id": "34a520bc", + "id": "a4a1252c", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:28.074579Z", @@ -60,7 +60,7 @@ { "cell_type": "code", "execution_count": 41, - "id": "2627e90f", + "id": "ea7c9801", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:30.701510Z", @@ -182,7 +182,7 @@ }, { "cell_type": "markdown", - "id": "fe10c427", + "id": "6adecdf1", "metadata": {}, "source": [ "#### Understand shape of data" @@ -191,7 +191,7 @@ { "cell_type": "code", "execution_count": 42, - "id": "01e44aa2", + "id": "cbf4fe1b", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:34.211885Z", @@ -321,7 +321,7 @@ }, { "cell_type": "markdown", - "id": "8b3d8fdb", + "id": "ca5c2d81", "metadata": { "ExecuteTime": { "end_time": "2022-03-22T05:57:27.176179Z", @@ -335,7 +335,7 @@ { "cell_type": "code", "execution_count": 43, - "id": "4e17920b", + "id": "86f023e4", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:38.564518Z", @@ -351,7 +351,7 @@ { "cell_type": "code", "execution_count": 51, - "id": "8ff82424", + "id": "d9ba744c", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:12:09.990992Z", @@ -387,7 +387,7 @@ }, { "cell_type": "markdown", - "id": "3a631ed8", + "id": "c682d6ce", "metadata": {}, "source": [ "#### Some times JSON file is missing reservationTerm or sometimes carry the values are 1 Year, 3 Years or onDemand\n", @@ -397,7 +397,7 @@ { "cell_type": "code", "execution_count": 44, - "id": "aae79f0c", + "id": "5de7cb44", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:09:43.697103Z", @@ -422,7 +422,7 @@ { "cell_type": "code", "execution_count": 52, - "id": "bb0bc855", + "id": "d18c4062", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:12:51.483718Z", @@ -851,7 +851,7 @@ }, { "cell_type": "markdown", - "id": "3245dead", + "id": "cee61cf0", "metadata": {}, "source": [ "#### Understand unique type, Typical values are Consumption and Reservation" @@ -860,7 +860,7 @@ { "cell_type": "code", "execution_count": 53, - "id": "512be047", + "id": "9ce2ce26", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:12:59.466280Z", @@ -883,7 +883,7 @@ { "cell_type": "code", "execution_count": 54, - "id": "38bfda5d", + "id": "4d97f095", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:01.864134Z", @@ -906,7 +906,7 @@ { "cell_type": "code", "execution_count": 55, - "id": "1d6a6793", + "id": "21aeca5b", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:05.125246Z", @@ -1302,7 +1302,7 @@ { "cell_type": "code", "execution_count": 56, - "id": "71e99793", + "id": "fdfc834f", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:11.063715Z", @@ -2279,7 +2279,7 @@ }, { "cell_type": "markdown", - "id": "97670f73", + "id": "48943c2d", "metadata": {}, "source": [ "#### Group by columns ('armRegionName','productName','skuName','serviceName','serviceFamily') to get region wise Max Price and Min Price" @@ -2288,7 +2288,7 @@ { "cell_type": "code", "execution_count": 57, - "id": "1b5615ef", + "id": "da6d1522", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:15.529778Z", @@ -3122,7 +3122,7 @@ }, { "cell_type": "markdown", - "id": "a532eaaa", + "id": "9cdeb7d1", "metadata": {}, "source": [ "#### Data analysis to understand service prices for type Reservation" @@ -3131,7 +3131,7 @@ { "cell_type": "code", "execution_count": 58, - "id": "8669dac3", + "id": "793a4b99", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:23.371779Z", @@ -3518,7 +3518,7 @@ { "cell_type": "code", "execution_count": 59, - "id": "65957da3", + "id": "291edfd6", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:28.301798Z", @@ -3746,7 +3746,7 @@ { "cell_type": "code", "execution_count": 60, - "id": "a64843ce", + "id": "690c58b2", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T14:13:35.959811Z", @@ -3937,7 +3937,7 @@ }, { "cell_type": "markdown", - "id": "b43e5c09", + "id": "8386e683", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T13:38:17.721934Z", From cd3c76bd1a298cc8d8bd6bd7386029dac1a6ea80 Mon Sep 17 00:00:00 2001 From: Sumedh Patil Date: Wed, 30 Mar 2022 20:04:21 +0530 Subject: [PATCH 5/6] fix pre-commit-issues --- .../cloud_price_analysis_azure.ipynb | 3279 +++++------------ 1 file changed, 904 insertions(+), 2375 deletions(-) diff --git a/notebooks/experimental/cloud_price_analysis_azure.ipynb b/notebooks/experimental/cloud_price_analysis_azure.ipynb index ddab119..ee1371c 100644 --- a/notebooks/experimental/cloud_price_analysis_azure.ipynb +++ b/notebooks/experimental/cloud_price_analysis_azure.ipynb @@ -2,69 +2,60 @@ "cells": [ { "cell_type": "markdown", - "id": "13568ebc", "metadata": {}, "source": [ "### Analysis of Azure Pricing details \n", "\n", - "This notebook will analyze service name = 'Virtual Machines'\n", + "This notebook will analyze service name = \"Virtual Machines\"\n", "source JSON file https://prices.azure.com/api/retail/prices?api-version=2021-10-01-preview&meterRegion=%E2%80%99primary%E2%80%99" ] }, { "cell_type": "code", - "execution_count": 61, - "id": "ea3b02f4", + "execution_count": 1, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:19:38.686518Z", - "start_time": "2022-03-29T14:19:38.679959Z" + "end_time": "2022-03-30T14:21:13.594615Z", + "start_time": "2022-03-30T14:21:12.072308Z" } }, "outputs": [], "source": [ - "# import json as json\n", "import pandas as pd\n", - "\n", - "# from collections import defaultdict\n", "import requests" ] }, { "cell_type": "markdown", - "id": "da1ef330", "metadata": {}, "source": [ - "#### Access the API end point for 'Vitual Machine' and store JSON file at location ../data/raw/" + "#### Access the API end point for Vitual Machine and store JSON file at location ../data/raw/" ] }, { "cell_type": "code", - "execution_count": 40, - "id": "a4a1252c", + "execution_count": 2, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:09:28.074579Z", - "start_time": "2022-03-29T14:09:26.912800Z" + "end_time": "2022-03-30T14:21:14.454430Z", + "start_time": "2022-03-30T14:21:13.599343Z" } }, "outputs": [], "source": [ - "r = requests.get(\n", - " \"https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines'\"\n", - ")\n", + "params = {\"filter\" : \"serviceName eq Virtual Machines\"}\n", + "r = requests.get(\"https://prices.azure.com/api/retail/prices\", params = params)\n", "with open(\"../../data/raw/azure_vm.json\", \"w\") as fd:\n", " fd.write(r.text)" ] }, { "cell_type": "code", - "execution_count": 41, - "id": "ea7c9801", + "execution_count": 3, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:09:30.701510Z", - "start_time": "2022-03-29T14:09:30.632726Z" + "end_time": "2022-03-30T14:21:14.650696Z", + "start_time": "2022-03-30T14:21:14.465487Z" } }, "outputs": [ @@ -170,7 +161,7 @@ "4 https://prices.azure.com:443/api/retail/prices... 100 " ] }, - "execution_count": 41, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -182,7 +173,6 @@ }, { "cell_type": "markdown", - "id": "6adecdf1", "metadata": {}, "source": [ "#### Understand shape of data" @@ -190,12 +180,11 @@ }, { "cell_type": "code", - "execution_count": 42, - "id": "cbf4fe1b", + "execution_count": 4, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:09:34.211885Z", - "start_time": "2022-03-29T14:09:34.159463Z" + "end_time": "2022-03-30T14:21:14.808222Z", + "start_time": "2022-03-30T14:21:14.674502Z" } }, "outputs": [ @@ -305,7 +294,7 @@ "max 100.0" ] }, - "execution_count": 42, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -321,7 +310,6 @@ }, { "cell_type": "markdown", - "id": "ca5c2d81", "metadata": { "ExecuteTime": { "end_time": "2022-03-22T05:57:27.176179Z", @@ -334,28 +322,11 @@ }, { "cell_type": "code", - "execution_count": 43, - "id": "86f023e4", - "metadata": { - "ExecuteTime": { - "end_time": "2022-03-29T14:09:38.564518Z", - "start_time": "2022-03-29T14:09:38.555223Z" - } - }, - "outputs": [], - "source": [ - "df_items = df[\"Items\"]\n", - "df_items = df_items.fillna(\"NA\")" - ] - }, - { - "cell_type": "code", - "execution_count": 51, - "id": "d9ba744c", + "execution_count": 5, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:12:09.990992Z", - "start_time": "2022-03-29T14:12:09.963748Z" + "end_time": "2022-03-30T14:21:16.185057Z", + "start_time": "2022-03-30T14:21:14.814013Z" } }, "outputs": [ @@ -376,18 +347,19 @@ "Name: Items, Length: 100, dtype: object" ] }, - "execution_count": 51, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ + "df_items = df[\"Items\"]\n", + "df_items = df_items.fillna(\"NA\")\n", "df_items" ] }, { "cell_type": "markdown", - "id": "c682d6ce", "metadata": {}, "source": [ "#### Some times JSON file is missing reservationTerm or sometimes carry the values are 1 Year, 3 Years or onDemand\n", @@ -396,12 +368,11 @@ }, { "cell_type": "code", - "execution_count": 44, - "id": "5de7cb44", + "execution_count": 6, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:09:43.697103Z", - "start_time": "2022-03-29T14:09:42.059624Z" + "end_time": "2022-03-30T14:21:18.103506Z", + "start_time": "2022-03-30T14:21:16.193778Z" }, "code_folding": [] }, @@ -415,18 +386,16 @@ " df_items_2 = pd.concat([df_items_2, df_dictionary], ignore_index=True)\n", " else:\n", " data[\"reservationTerm\"] = \"OnDemand\"\n", - " # df_dictionary = pd.DataFrame([data])\n", " df_items_2 = pd.concat([df_items_2, df_dictionary], ignore_index=True)" ] }, { "cell_type": "code", - "execution_count": 52, - "id": "d18c4062", + "execution_count": 7, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:12:51.483718Z", - "start_time": "2022-03-29T14:12:51.344254Z" + "end_time": "2022-03-30T14:21:18.320177Z", + "start_time": "2022-03-30T14:21:18.111715Z" } }, "outputs": [ @@ -575,24 +544,24 @@ " 4\n", " USD\n", " 0.0\n", - " 0.190000\n", - " 0.190000\n", - " uknorth\n", - " UK North\n", - " 2019-10-16T00:00:00Z\n", + " 10.560000\n", + " 10.560000\n", + " uksouth\n", + " UK South\n", + " 2018-11-01T00:00:00Z\n", " NA\n", - " 0001e46a-9285-5fa8-b48a-240e307a24f7\n", - " A3 Spot\n", + " 0001d427-82df-4d83-8ab2-b60768527e08\n", + " E10 Disks\n", " ...\n", - " Virtual Machines A Series Windows\n", - " A3 Spot\n", - " Virtual Machines\n", - " DZH313Z7MMC8\n", - " Compute\n", - " 1 Hour\n", + " Standard SSD Managed Disks\n", + " E10 LRS\n", + " Storage\n", + " DZH317F1HKN0\n", + " Storage\n", + " 1/Month\n", " Consumption\n", " True\n", - " Standard_A3\n", + " \n", " NA\n", " \n", " \n", @@ -623,120 +592,120 @@ " 95\n", " USD\n", " 0.0\n", - " 0.180000\n", - " 0.180000\n", - " uaecentral\n", - " AE Central\n", + " 0.212000\n", + " 0.212000\n", + " westcentralus\n", + " US West Central\n", " 2021-11-01T00:00:00Z\n", " NA\n", - " 001fa4dd-bbe2-5502-b172-8a1af70ea8b8\n", - " D2ds v5\n", + " 00172462-4604-5a25-b1d4-f057577d68e0\n", + " E4ds v5 Low Priority\n", " ...\n", - " Virtual Machines Ddsv5 Series Windows\n", - " Standard_D2ds_v5\n", + " Virtual Machines Edsv5 Series Windows\n", + " E4ds v5 Low Priority\n", " Virtual Machines\n", " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " DevTestConsumption\n", + " Consumption\n", " True\n", - " Standard_D2ds_v5\n", + " Standard_E4ds_v5\n", " NA\n", " \n", " \n", " 96\n", " USD\n", " 0.0\n", - " 0.272000\n", - " 0.272000\n", - " uaecentral\n", - " AE Central\n", + " 0.069100\n", + " 0.069100\n", + " westcentralus\n", + " US West Central\n", " 2021-11-01T00:00:00Z\n", " NA\n", - " 001fa4dd-bbe2-5502-b172-8a1af70ea8b8\n", - " D2ds v5\n", + " 00172462-4604-5a25-b1d4-f057577d68e0\n", + " E4-2ds v5 Low Priority\n", " ...\n", - " Virtual Machines Ddsv5 Series Windows\n", - " Standard_D2ds_v5\n", + " Virtual Machines Edsv5 Series Windows\n", + " E4-2ds v5 Low Priority\n", " Virtual Machines\n", " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " Consumption\n", - " True\n", - " Standard_D2ds_v5\n", + " DevTestConsumption\n", + " False\n", + " Standard_E4-2ds_v5\n", " NA\n", " \n", " \n", " 97\n", " USD\n", " 0.0\n", - " 1.949000\n", - " 1.949000\n", - " uksouth\n", - " UK South\n", + " 0.212000\n", + " 0.212000\n", + " westcentralus\n", + " US West Central\n", " 2021-11-01T00:00:00Z\n", " NA\n", - " 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3\n", - " D48s v5 Low Priority\n", + " 00172462-4604-5a25-b1d4-f057577d68e0\n", + " E4-2ds v5 Low Priority\n", " ...\n", - " Virtual Machines Dsv5 Series Windows\n", - " Standard_D48s_v5 Low Priority\n", + " Virtual Machines Edsv5 Series Windows\n", + " E4-2ds v5 Low Priority\n", " Virtual Machines\n", " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", " Consumption\n", - " True\n", - " Standard_D48s_v5\n", + " False\n", + " Standard_E4-2ds_v5\n", " NA\n", " \n", " \n", " 98\n", " USD\n", " 0.0\n", - " 0.533000\n", - " 0.533000\n", - " uksouth\n", - " UK South\n", - " 2021-11-01T00:00:00Z\n", - " NA\n", - " 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3\n", - " D48s v5 Low Priority\n", + " 0.181440\n", + " 0.181440\n", + " southindia\n", + " IN South\n", + " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", + " 001752ab-2e87-599e-8fac-f1ada637ca61\n", + " D5 v2/DS5 v2 Spot\n", " ...\n", - " Virtual Machines Dsv5 Series Windows\n", - " Standard_D48s_v5 Low Priority\n", + " Virtual Machines Dv2 Series\n", + " D5 v2 Spot\n", " Virtual Machines\n", " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", - " DevTestConsumption\n", + " Consumption\n", " True\n", - " Standard_D48s_v5\n", + " Standard_D5_v2\n", " NA\n", " \n", " \n", " 99\n", " USD\n", " 0.0\n", - " 40.896000\n", - " 40.896000\n", - " eastus2\n", - " US East 2\n", - " 2021-01-01T00:00:00Z\n", + " 0.456000\n", + " 0.456000\n", + " canadacentral\n", + " CA Central\n", + " 2021-10-01T00:00:00Z\n", " NA\n", - " 00204db1-b465-59e2-baa7-bc6b848c5b78\n", - " M192idms_v2\n", + " 001790af-f893-596a-b4f9-7b0837df43e3\n", + " DS13 Low Priority\n", " ...\n", - " Virtual Machines MdSv2 Series Windows\n", - " M192idms_v2\n", + " Virtual Machines DS Series Windows\n", + " DS13 Low Priority\n", " Virtual Machines\n", " DZH313Z7MMC8\n", " Compute\n", " 1 Hour\n", " Consumption\n", - " True\n", - " Standard_M192idms_v2\n", + " False\n", + " Standard_DS13\n", " NA\n", " \n", " \n", @@ -745,64 +714,64 @@ "" ], "text/plain": [ - " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", - "0 USD 0.0 0.262752 0.262752 southindia \n", - "1 USD 0.0 0.542506 0.542506 southindia \n", - "2 USD 0.0 0.865075 0.865075 eastasia \n", - "3 USD 0.0 1.468006 1.468006 eastasia \n", - "4 USD 0.0 0.190000 0.190000 uknorth \n", - ".. ... ... ... ... ... \n", - "95 USD 0.0 0.180000 0.180000 uaecentral \n", - "96 USD 0.0 0.272000 0.272000 uaecentral \n", - "97 USD 0.0 1.949000 1.949000 uksouth \n", - "98 USD 0.0 0.533000 0.533000 uksouth \n", - "99 USD 0.0 40.896000 40.896000 eastus2 \n", + " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", + "0 USD 0.0 0.262752 0.262752 southindia \n", + "1 USD 0.0 0.542506 0.542506 southindia \n", + "2 USD 0.0 0.865075 0.865075 eastasia \n", + "3 USD 0.0 1.468006 1.468006 eastasia \n", + "4 USD 0.0 10.560000 10.560000 uksouth \n", + ".. ... ... ... ... ... \n", + "95 USD 0.0 0.212000 0.212000 westcentralus \n", + "96 USD 0.0 0.069100 0.069100 westcentralus \n", + "97 USD 0.0 0.212000 0.212000 westcentralus \n", + "98 USD 0.0 0.181440 0.181440 southindia \n", + "99 USD 0.0 0.456000 0.456000 canadacentral \n", "\n", - " location effectiveStartDate effectiveEndDate \\\n", - "0 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "1 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "2 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "3 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "4 UK North 2019-10-16T00:00:00Z NA \n", - ".. ... ... ... \n", - "95 AE Central 2021-11-01T00:00:00Z NA \n", - "96 AE Central 2021-11-01T00:00:00Z NA \n", - "97 UK South 2021-11-01T00:00:00Z NA \n", - "98 UK South 2021-11-01T00:00:00Z NA \n", - "99 US East 2 2021-01-01T00:00:00Z NA \n", + " location effectiveStartDate effectiveEndDate \\\n", + "0 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "1 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "2 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "3 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "4 UK South 2018-11-01T00:00:00Z NA \n", + ".. ... ... ... \n", + "95 US West Central 2021-11-01T00:00:00Z NA \n", + "96 US West Central 2021-11-01T00:00:00Z NA \n", + "97 US West Central 2021-11-01T00:00:00Z NA \n", + "98 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "99 CA Central 2021-10-01T00:00:00Z NA \n", "\n", - " meterId meterName ... \\\n", - "0 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", - "1 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", - "2 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", - "3 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", - "4 0001e46a-9285-5fa8-b48a-240e307a24f7 A3 Spot ... \n", - ".. ... ... ... \n", - "95 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 D2ds v5 ... \n", - "96 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 D2ds v5 ... \n", - "97 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 D48s v5 Low Priority ... \n", - "98 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 D48s v5 Low Priority ... \n", - "99 00204db1-b465-59e2-baa7-bc6b848c5b78 M192idms_v2 ... \n", + " meterId meterName ... \\\n", + "0 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", + "1 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", + "2 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", + "3 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", + "4 0001d427-82df-4d83-8ab2-b60768527e08 E10 Disks ... \n", + ".. ... ... ... \n", + "95 00172462-4604-5a25-b1d4-f057577d68e0 E4ds v5 Low Priority ... \n", + "96 00172462-4604-5a25-b1d4-f057577d68e0 E4-2ds v5 Low Priority ... \n", + "97 00172462-4604-5a25-b1d4-f057577d68e0 E4-2ds v5 Low Priority ... \n", + "98 001752ab-2e87-599e-8fac-f1ada637ca61 D5 v2/DS5 v2 Spot ... \n", + "99 001790af-f893-596a-b4f9-7b0837df43e3 DS13 Low Priority ... \n", "\n", - " productName skuName \\\n", - "0 Virtual Machines D Series Windows D14 Spot \n", - "1 Virtual Machines D Series Windows D14 Spot \n", - "2 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", - "3 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", - "4 Virtual Machines A Series Windows A3 Spot \n", - ".. ... ... \n", - "95 Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 \n", - "96 Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 \n", - "97 Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority \n", - "98 Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority \n", - "99 Virtual Machines MdSv2 Series Windows M192idms_v2 \n", + " productName skuName \\\n", + "0 Virtual Machines D Series Windows D14 Spot \n", + "1 Virtual Machines D Series Windows D14 Spot \n", + "2 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", + "3 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", + "4 Standard SSD Managed Disks E10 LRS \n", + ".. ... ... \n", + "95 Virtual Machines Edsv5 Series Windows E4ds v5 Low Priority \n", + "96 Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority \n", + "97 Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority \n", + "98 Virtual Machines Dv2 Series D5 v2 Spot \n", + "99 Virtual Machines DS Series Windows DS13 Low Priority \n", "\n", " serviceName serviceId serviceFamily unitOfMeasure \\\n", "0 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", "1 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", "2 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", "3 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", - "4 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", + "4 Storage DZH317F1HKN0 Storage 1/Month \n", ".. ... ... ... ... \n", "95 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", "96 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", @@ -810,18 +779,18 @@ "98 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", "99 Virtual Machines DZH313Z7MMC8 Compute 1 Hour \n", "\n", - " type isPrimaryMeterRegion armSkuName \\\n", - "0 DevTestConsumption True Standard_D14 \n", - "1 Consumption True Standard_D14 \n", - "2 DevTestConsumption True Standard_D64s_v5 \n", - "3 Consumption True Standard_D64s_v5 \n", - "4 Consumption True Standard_A3 \n", - ".. ... ... ... \n", - "95 DevTestConsumption True Standard_D2ds_v5 \n", - "96 Consumption True Standard_D2ds_v5 \n", - "97 Consumption True Standard_D48s_v5 \n", - "98 DevTestConsumption True Standard_D48s_v5 \n", - "99 Consumption True Standard_M192idms_v2 \n", + " type isPrimaryMeterRegion armSkuName \\\n", + "0 DevTestConsumption True Standard_D14 \n", + "1 Consumption True Standard_D14 \n", + "2 DevTestConsumption True Standard_D64s_v5 \n", + "3 Consumption True Standard_D64s_v5 \n", + "4 Consumption True \n", + ".. ... ... ... \n", + "95 Consumption True Standard_E4ds_v5 \n", + "96 DevTestConsumption False Standard_E4-2ds_v5 \n", + "97 Consumption False Standard_E4-2ds_v5 \n", + "98 Consumption True Standard_D5_v2 \n", + "99 Consumption False Standard_DS13 \n", "\n", " reservationTerm \n", "0 NA \n", @@ -839,7 +808,7 @@ "[100 rows x 22 columns]" ] }, - "execution_count": 52, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -851,7 +820,6 @@ }, { "cell_type": "markdown", - "id": "cee61cf0", "metadata": {}, "source": [ "#### Understand unique type, Typical values are Consumption and Reservation" @@ -859,12 +827,11 @@ }, { "cell_type": "code", - "execution_count": 53, - "id": "9ce2ce26", + "execution_count": 8, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:12:59.466280Z", - "start_time": "2022-03-29T14:12:59.456496Z" + "end_time": "2022-03-30T14:21:18.338384Z", + "start_time": "2022-03-30T14:21:18.328828Z" } }, "outputs": [ @@ -882,12 +849,11 @@ }, { "cell_type": "code", - "execution_count": 54, - "id": "4d97f095", + "execution_count": 9, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:13:01.864134Z", - "start_time": "2022-03-29T14:13:01.854114Z" + "end_time": "2022-03-30T14:21:18.606000Z", + "start_time": "2022-03-30T14:21:18.354050Z" } }, "outputs": [ @@ -905,408 +871,11 @@ }, { "cell_type": "code", - "execution_count": 55, - "id": "21aeca5b", - "metadata": { - "ExecuteTime": { - "end_time": "2022-03-29T14:13:05.125246Z", - "start_time": "2022-03-29T14:13:05.029425Z" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", - "1 USD 0.0 0.542506 0.542506 southindia \n", - "3 USD 0.0 1.468006 1.468006 eastasia \n", - "4 USD 0.0 0.190000 0.190000 uknorth \n", - "6 USD 0.0 0.075600 0.075600 westus \n", - "7 USD 0.0 0.023600 0.023600 westindia \n", - "8 USD 0.0 0.036547 0.036547 northeurope \n", - "9 USD 0.0 1.504000 1.504000 eastus2 \n", - "12 USD 0.0 0.537088 0.537088 australiasoutheast \n", - "13 USD 0.0 1.482000 1.482000 northcentralus \n", - "14 USD 0.0 1.482000 1.482000 northcentralus \n", - "15 USD 0.0 0.112000 0.112000 brazilsouth \n", - "16 USD 0.0 0.114000 0.114000 centralus \n", - "17 USD 0.0 3.886000 3.886000 koreasouth \n", - "20 USD 0.0 0.571308 0.571308 westeurope \n", - "21 USD 0.0 0.090720 0.090720 westindia \n", - "23 USD 0.0 3.616000 3.616000 westus2 \n", - "25 USD 0.0 0.348000 0.348000 japaneast \n", - "26 USD 0.0 0.341510 0.341510 usgovtexas \n", - "27 USD 0.0 7.603000 7.603000 koreasouth \n", - "30 USD 0.0 0.108000 0.108000 eastus \n", - "31 USD 0.0 0.420000 0.420000 southafricawest \n", - "32 USD 0.0 0.420000 0.420000 southafricawest \n", - "34 USD 0.0 0.424000 0.424000 japaneast \n", - "36 USD 0.0 0.403024 0.403024 australiasoutheast \n", - "37 USD 0.0 0.314500 0.314500 uaecentral \n", - "38 USD 0.0 1.991000 1.991000 japaneast \n", - "39 USD 0.0 0.483000 0.483000 switzerlandnorth \n", - "42 USD 0.0 0.389939 0.389939 japanwest \n", - "43 USD 0.0 0.411800 0.411800 southeastasia \n", - "45 USD 0.0 2.057530 2.057530 australiaeast \n", - "47 USD 0.0 3.872000 3.872000 usgovarizona \n", - "50 USD 0.0 8.294000 8.294000 japanwest \n", - "51 USD 0.0 1.000000 1.000000 canadacentral \n", - "54 USD 0.0 17.373000 17.373000 brazilsouth \n", - "55 USD 0.0 4.838000 4.838000 southcentralus \n", - "59 USD 0.0 0.212000 0.212000 westcentralus \n", - "60 USD 0.0 0.212000 0.212000 westcentralus \n", - "62 USD 0.0 0.181440 0.181440 southindia \n", - "63 USD 0.0 0.456000 0.456000 canadacentral \n", - "66 USD 0.0 0.456000 0.456000 canadacentral \n", - "67 USD 0.0 0.039110 0.039110 usgovarizona \n", - "68 USD 0.0 0.105000 0.105000 eastus2 \n", - "69 USD 0.0 1.449600 1.449600 australiacentral2 \n", - "71 USD 0.0 10.440000 10.440000 southindia \n", - "72 USD 0.0 0.338691 0.338691 uaenorth \n", - "74 USD 0.0 6.768000 6.768000 northeurope \n", - "78 USD 0.0 3.224400 3.224400 uknorth \n", - "79 USD 0.0 0.055200 0.055200 canadaeast \n", - "80 USD 0.0 0.055200 0.055200 canadaeast \n", - "81 USD 0.0 2.093000 2.093000 westus2 \n", - "83 USD 0.0 2.093000 2.093000 westus2 \n", - "85 USD 0.0 0.157200 0.157200 uaecentral \n", - "86 USD 0.0 0.054000 0.054000 centralus \n", - "88 USD 0.0 0.538474 0.538474 southafricawest \n", - "90 USD 0.0 2.551000 2.551000 westindia \n", - "92 USD 0.0 0.723000 0.723000 westus2 \n", - "94 USD 0.0 0.184710 0.184710 australiacentral \n", - "96 USD 0.0 0.272000 0.272000 uaecentral \n", - "97 USD 0.0 1.949000 1.949000 uksouth \n", - "99 USD 0.0 40.896000 40.896000 eastus2 \n", - "\n", - " location effectiveStartDate effectiveEndDate \\\n", - "1 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "3 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "4 UK North 2019-10-16T00:00:00Z NA \n", - "6 US West 2021-11-01T00:00:00Z NA \n", - "7 IN West 2021-02-01T00:00:00Z NA \n", - "8 EU North 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "9 US East 2 2021-12-01T00:00:00Z NA \n", - "12 AU Southeast 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "13 US North Central 2018-09-01T00:00:00Z NA \n", - "14 US North Central 2018-09-01T00:00:00Z NA \n", - "15 BR South 2016-09-01T00:00:00Z NA \n", - "16 US Central 2020-08-01T00:00:00Z NA \n", - "17 KR South 2021-11-01T00:00:00Z NA \n", - "20 EU West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "21 IN West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "23 US West 2 2021-11-01T00:00:00Z NA \n", - "25 JA East 2021-11-01T00:00:00Z NA \n", - "26 US Gov TX 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "27 KR South 2021-12-01T00:00:00Z NA \n", - "30 US East 2021-10-01T00:00:00Z NA \n", - "31 ZA West 2020-09-01T00:00:00Z NA \n", - "32 ZA West 2020-09-01T00:00:00Z NA \n", - "34 JA East 2016-01-11T00:00:00Z NA \n", - "36 AU Southeast 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "37 AE Central 2022-02-01T00:00:00Z NA \n", - "38 JA East 2021-11-01T00:00:00Z NA \n", - "39 CH North 2021-11-01T00:00:00Z NA \n", - "42 JA West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "43 AP Southeast 2021-12-01T00:00:00Z NA \n", - "45 AU East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "47 US Gov AZ 2020-08-01T00:00:00Z NA \n", - "50 JA West 2020-08-01T00:00:00Z NA \n", - "51 CA Central 2020-06-01T00:00:00Z NA \n", - "54 BR South 2022-02-01T00:00:00Z NA \n", - "55 US South Central 2020-08-01T00:00:00Z NA \n", - "59 US West Central 2021-11-01T00:00:00Z NA \n", - "60 US West Central 2021-11-01T00:00:00Z NA \n", - "62 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "63 CA Central 2021-10-01T00:00:00Z NA \n", - "66 CA Central 2021-10-01T00:00:00Z NA \n", - "67 US Gov AZ 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "68 US East 2 2021-11-01T00:00:00Z NA \n", - "69 AU Central 2 2021-11-01T00:00:00Z NA \n", - "71 IN South 2021-02-01T00:00:00Z NA \n", - "72 AE North 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "74 EU North 2021-11-01T00:00:00Z NA \n", - "78 UK North 2019-10-16T00:00:00Z NA \n", - "79 CA East 2021-11-01T00:00:00Z NA \n", - "80 CA East 2021-11-01T00:00:00Z NA \n", - "81 US West 2 2019-06-01T00:00:00Z NA \n", - "83 US West 2 2019-06-01T00:00:00Z NA \n", - "85 AE Central 2022-02-01T00:00:00Z NA \n", - "86 US Central 2022-03-01T00:00:00Z NA \n", - "88 ZA West 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", - "90 IN West 2021-02-01T00:00:00Z NA \n", - "92 US West 2 2020-06-01T00:00:00Z NA \n", - "94 AU Central 2021-11-01T00:00:00Z NA \n", - "96 AE Central 2021-11-01T00:00:00Z NA \n", - "97 UK South 2021-11-01T00:00:00Z NA \n", - "99 US East 2 2021-01-01T00:00:00Z NA \n", - "\n", - " meterId meterName ... \\\n", - "1 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", - "3 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", - "4 0001e46a-9285-5fa8-b48a-240e307a24f7 A3 Spot ... \n", - "6 00026917-5c42-5cf2-994e-4037490635aa E2bds v5 Spot ... \n", - "7 000419bc-6006-53ea-8976-1644249b9728 D2 v4 Low Priority ... \n", - "8 00045dc9-530b-5c69-94ff-1a8cb5475849 E2s v5 Spot ... \n", - "9 0007942f-35ac-5c71-9845-63365457677b D16s v5 ... \n", - "12 00081217-b2ba-5564-b978-05466d34bb98 E16-8ads v5 Spot ... \n", - "13 0008a792-d49f-4f13-a461-9c9f24e92ccf D14 v2/DS14 v2 - Expired ... \n", - "14 0008a792-d49f-4f13-a461-9c9f24e92ccf DS14 v2 - Expired ... \n", - "15 0008ac09-705a-431e-b9c7-026746cb920a A2 ... \n", - "16 0009109e-82c2-5cc4-a0e0-91354982115c E8-2s v4 Low Priority ... \n", - "17 0009a0a2-af7b-5fc7-9e4a-a0c5e18c0dfb D96 v5 Low Priority ... \n", - "20 000a794b-bdb0-58be-a0cd-0c3a0f222923 F16s Spot ... \n", - "21 000a9e97-ffbf-58eb-ac5a-94e4fe39065e DS4 v2 Spot ... \n", - "23 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", - "25 000b49e6-05c3-56b7-a568-dd694eda0217 E20d v5 Low Priority ... \n", - "26 000b8582-d57d-5831-b49f-f8150e4b545e F16s Spot ... \n", - "27 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", - "30 000c494f-505a-508d-84e3-6c512039061f DC8as v5 Low Priority ... \n", - "31 000db1d1-1d7f-484f-a2c2-144eeb049ae3 E20 v3/E20s v3 Low Priority ... \n", - "32 000db1d1-1d7f-484f-a2c2-144eeb049ae3 E20s v3 Low Priority ... \n", - "34 000e0d7d-c353-4741-9ffc-e9fcdaebf8f7 A3 ... \n", - "36 0010a9ec-605e-5713-905c-d621b5c24287 F16/F16s Spot ... \n", - "37 00122690-2bfb-5526-99aa-e623c03c9cb5 E32 v4 Spot ... \n", - "38 00127bb7-c581-530f-87b6-83075ba4c830 E104ids v5 Low Priority ... \n", - "39 00136631-af19-59d8-b589-64539bf4c313 D4ds v5 ... \n", - "42 0013b5b5-1def-5033-8bc4-996ad572c70b D16ds v5 Spot ... \n", - "43 0013cc18-d927-5e54-b9d2-8c33426c8731 HC44-32rs Spot ... \n", - "45 0013dbe4-13bb-5ffc-a2ab-7e458c213b4c E64-16s v4 Spot ... \n", - "47 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", - "50 00152fd6-8833-5153-b72d-d22ea8d21a58 E64s v4 ... \n", - "51 0015ecfc-d496-53fc-bdf0-51f386309382 E20ds v4 Low Priority ... \n", - "54 0015fba1-4cb7-52b0-9c1a-10b973586310 M416s v2 Spot ... \n", - "55 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", - "59 00172462-4604-5a25-b1d4-f057577d68e0 E4ds v5 Low Priority ... \n", - "60 00172462-4604-5a25-b1d4-f057577d68e0 E4-2ds v5 Low Priority ... \n", - "62 001752ab-2e87-599e-8fac-f1ada637ca61 D5 v2/DS5 v2 Spot ... \n", - "63 001790af-f893-596a-b4f9-7b0837df43e3 DS13 Low Priority ... \n", - "66 001790af-f893-596a-b4f9-7b0837df43e3 D13/DS13 Low Priority ... \n", - "67 0017db3a-769f-5580-b8a3-b5321d90d855 NV4as v4 Spot ... \n", - "68 001890d1-4eeb-5c0f-aadd-ac36d1491470 E8-4ads v5 Low Priority ... \n", - "69 00194e51-843b-511a-b0a5-08b9ba78a2fe E48s v5 Spot ... \n", - "71 0019a4a1-0edb-5a85-adc2-88ec83185792 M128 Low Priority ... \n", - "72 001a63f3-4e3e-5294-b452-3b085c7f3342 D16s v3 Spot ... \n", - "74 001a6f90-bc8f-572e-b7bc-f95af3413781 E96 v5 ... \n", - "78 001a9491-4161-57d9-8706-6ea34207a896 E64 v3/E64s v3 Spot ... \n", - "79 001b8a57-c3fa-543f-b93c-95fa79f110ed E4s v5 Low Priority ... \n", - "80 001b8a57-c3fa-543f-b93c-95fa79f110ed E4-2s v5 Low Priority ... \n", - "81 001bb3f4-7d99-4d22-9aaa-052b3f2463e0 E48 v3/E48s v3 Low Priority ... \n", - "83 001bb3f4-7d99-4d22-9aaa-052b3f2463e0 E48s v3 Low Priority ... \n", - "85 001c6265-1401-56fd-879f-4101ef0f295e E16 v4 Spot ... \n", - "86 001caea7-ff8a-5957-8480-7f1121cc1976 A3 Spot ... \n", - "88 001d3eb5-55b4-5b5e-84d4-cb22a0dd91f0 E16ds v4 Spot ... \n", - "90 001dbef5-9180-5e2c-b699-53f786ae1dda E48ds v4 Low Priority ... \n", - "92 001e13b1-2bad-525e-b9a7-02de9f2be735 D64ds v4 Low Priority ... \n", - "94 001effd3-ac3b-5c06-a9f4-1cb6f7f70d45 E8-2ds v4 Spot ... \n", - "96 001fa4dd-bbe2-5502-b172-8a1af70ea8b8 D2ds v5 ... \n", - "97 001fa6ba-405f-5854-9dd5-5ecd8a7d7ef3 D48s v5 Low Priority ... \n", - "99 00204db1-b465-59e2-baa7-bc6b848c5b78 M192idms_v2 ... \n", - "\n", - " productName skuName \\\n", - "1 Virtual Machines D Series Windows D14 Spot \n", - "3 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", - "4 Virtual Machines A Series Windows A3 Spot \n", - "6 Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot \n", - "7 Virtual Machines Dv4 Series D2 v4 Low Priority \n", - "8 Virtual Machines Esv5 Series E2s v5 Spot \n", - "9 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 \n", - "12 Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot \n", - "13 Virtual Machines Dv2 promo Series D14 v2 \n", - "14 Virtual Machines DSv2 promo Series DS14 v2 \n", - "15 Virtual Machines A Series Basic A2 \n", - "16 Virtual Machines Esv4 Series E8-2s v4 Low Priority \n", - "17 Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority \n", - "20 Virtual Machines FS Series Windows F16s Spot \n", - "21 Virtual Machines DSv2 Series DS4 v2 Spot \n", - "23 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", - "25 Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority \n", - "26 Virtual Machines FS Series Windows F16s Spot \n", - "27 Easv4 Series Dedicated Host Easv4 Type2 \n", - "30 DCasv5-series Linux Standard_DC8as_v5 Low Priority \n", - "31 Virtual Machines Ev3 Series E20 v3 Low Priority \n", - "32 Virtual Machines ESv3 Series E20s v3 Low Priority \n", - "34 Virtual Machines A Series Windows A3 \n", - "36 Virtual Machines F Series Windows F16 Spot \n", - "37 Virtual Machines Ev4 Series E32 v4 Spot \n", - "38 Virtual Machines Edsv5 Series E104ids v5 Low Priority \n", - "39 Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 \n", - "42 Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot \n", - "43 Virtual Machines HCS Series HC44-32rs Spot \n", - "45 Virtual Machines Esv4 Series Windows E64-16s v4 Spot \n", - "47 Virtual Machines Dsv4 Series D64s v4 \n", - "50 Virtual Machines Esv4 Series Windows E64s v4 \n", - "51 Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority \n", - "54 Virtual Machines MSv2 Series Windows M416s v2 Spot \n", - "55 Virtual Machines Ev4 Series E64 v4 \n", - "59 Virtual Machines Edsv5 Series Windows E4ds v5 Low Priority \n", - "60 Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority \n", - "62 Virtual Machines Dv2 Series D5 v2 Spot \n", - "63 Virtual Machines DS Series Windows DS13 Low Priority \n", - "66 Virtual Machines D Series Windows D13 Low Priority \n", - "67 Virtual Machines NVasv4 Series NV4as v4 Spot \n", - "68 Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority \n", - "69 Virtual Machines Esv5 Series E48s v5 Spot \n", - "71 Virtual Machines MS Series Windows M128 Low Priority \n", - "72 Virtual Machines DSv3 Series Windows D16s v3 Spot \n", - "74 Virtual Machines Ev5 Series Standard_E96_v5 \n", - "78 Virtual Machines Ev3 Series Windows E64 v3 Spot \n", - "79 Virtual Machines Esv5 Series E4s v5 Low Priority \n", - "80 Virtual Machines Esv5 Series E4-2s v5 Low Priority \n", - "81 Virtual Machines Ev3 Series Windows E48 v3 Low Priority \n", - "83 Virtual Machines ESv3 Series Windows E48s v3 Low Priority \n", - "85 Virtual Machines Ev4 Series E16 v4 Spot \n", - "86 Virtual Machines A Series Windows A3 Spot \n", - "88 Virtual Machines Edsv4 Series Windows E16ds v4 Spot \n", - "90 Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority \n", - "92 Virtual Machines Ddsv4 Series D64ds v4 Low Priority \n", - "94 Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot \n", - "96 Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 \n", - "97 Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority \n", - "99 Virtual Machines MdSv2 Series Windows M192idms_v2 \n", - "\n", - " serviceName serviceId serviceFamily unitOfMeasure type \\\n", - "1 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "3 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "4 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "6 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "7 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "8 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "9 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "12 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "13 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "14 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "15 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "16 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "17 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "20 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "21 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "23 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "25 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "26 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "27 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "30 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "31 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "32 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "34 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "36 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "37 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "38 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "39 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "42 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "43 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "45 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "47 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "50 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "51 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "54 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "55 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "59 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "60 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "62 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "63 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "66 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "67 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "68 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "69 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "71 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "72 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "74 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "78 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "79 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "80 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "81 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "83 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "85 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "86 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "88 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "90 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "92 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "94 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "96 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "97 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "99 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", - "\n", - " isPrimaryMeterRegion armSkuName reservationTerm \n", - "1 True Standard_D14 NA \n", - "3 True Standard_D64s_v5 NA \n", - "4 True Standard_A3 NA \n", - "6 True Standard_E2bds_v5 NA \n", - "7 True Standard_D2_v4 NA \n", - "8 True Standard_E2s_v5 NA \n", - "9 True Standard_D16s_v5 NA \n", - "12 True Standard_E16-8ads_v5 NA \n", - "13 True Standard_D14_v2_Promo NA \n", - "14 False Standard_DS14_v2_Promo NA \n", - "15 True Basic_A2 NA \n", - "16 True Standard_E8-2s_v4 NA \n", - "17 True Standard_D96_v5 NA \n", - "20 True Standard_F16s NA \n", - "21 True Standard_DS4_v2 NA \n", - "23 True Standard_D64ds_v5 NA \n", - "25 True Standard_E20d_v5 NA \n", - "26 True Standard_F16s NA \n", - "27 True Easv4_Type2 NA \n", - "30 True Standard_DC8as_v5 NA \n", - "31 True Standard_E20_v3 NA \n", - "32 False Standard_E20s_v3 NA \n", - "34 True Standard_A3 NA \n", - "36 True Standard_F16 NA \n", - "37 True Standard_E32_v4 NA \n", - "38 True Standard_E104ids_v5 NA \n", - "39 True Standard_D4ds_v5 NA \n", - "42 True Standard_D16ds_v5 NA \n", - "43 True Standard_HC44-32rs NA \n", - "45 True Standard_E64-16s_v4 NA \n", - "47 True Standard_D64s_v4 NA \n", - "50 True Standard_E64s_v4 NA \n", - "51 True Standard_E20ds_v4 NA \n", - "54 True Standard_M416s_v2 NA \n", - "55 True Standard_E64_v4 NA \n", - "59 True Standard_E4ds_v5 NA \n", - "60 False Standard_E4-2ds_v5 NA \n", - "62 True Standard_D5_v2 NA \n", - "63 False Standard_DS13 NA \n", - "66 True Standard_D13 NA \n", - "67 True Standard_NV4as_v4 NA \n", - "68 True Standard_E8-4ads_v5 NA \n", - "69 True Standard_E48s_v5 NA \n", - "71 True Standard_M128 NA \n", - "72 True Standard_D16s_v3 NA \n", - "74 True Standard_E96_v5 NA \n", - "78 True Standard_E64_v3 NA \n", - "79 True Standard_E4s_v5 NA \n", - "80 False Standard_E4-2s_v5 NA \n", - "81 True Standard_E48_v3 NA \n", - "83 False Standard_E48s_v3 NA \n", - "85 True Standard_E16_v4 NA \n", - "86 True Standard_A3 NA \n", - "88 True Standard_E16ds_v4 NA \n", - "90 True Standard_E48ds_v4 NA \n", - "92 True Standard_D64ds_v4 NA \n", - "94 True Standard_E8-2ds_v4 NA \n", - "96 True Standard_D2ds_v5 NA \n", - "97 True Standard_D48s_v5 NA \n", - "99 True Standard_M192idms_v2 NA \n", - "\n", - "[60 rows x 22 columns]\n" - ] - } - ], - "source": [ - "df_consumption = df_items_2.loc[(df_items_2[\"type\"] == \"Consumption\")]\n", - "print(df_consumption)" - ] - }, - { - "cell_type": "code", - "execution_count": 56, - "id": "fdfc834f", + "execution_count": 10, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:13:11.063715Z", - "start_time": "2022-03-29T14:13:10.943916Z" + "end_time": "2022-03-30T14:21:18.941626Z", + "start_time": "2022-03-30T14:21:18.610847Z" } }, "outputs": [ @@ -1331,276 +900,440 @@ " \n", " \n", " \n", + " currencyCode\n", + " tierMinimumUnits\n", + " retailPrice\n", + " unitPrice\n", " armRegionName\n", + " location\n", + " effectiveStartDate\n", + " effectiveEndDate\n", + " meterId\n", + " meterName\n", + " ...\n", " productName\n", " skuName\n", - " retailPrice\n", - " currencyCode\n", " serviceName\n", + " serviceId\n", " serviceFamily\n", - " reservationTerm\n", + " unitOfMeasure\n", " type\n", + " isPrimaryMeterRegion\n", + " armSkuName\n", + " reservationTerm\n", " \n", " \n", " \n", " \n", " 1\n", + " USD\n", + " 0.0\n", + " 0.542506\n", + " 0.542506\n", " southindia\n", + " IN South\n", + " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", + " 000009d0-057f-5f2b-b7e9-9e26add324a8\n", + " D14/DS14 Spot\n", + " ...\n", " Virtual Machines D Series Windows\n", " D14 Spot\n", - " 0.542506\n", - " USD\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", + " True\n", + " Standard_D14\n", + " NA\n", " \n", " \n", " 3\n", + " USD\n", + " 0.0\n", + " 1.468006\n", + " 1.468006\n", " eastasia\n", + " AP East\n", + " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", + " 00014e7d-fff9-54dd-962e-4e992887ad3c\n", + " D64s v5 Spot\n", + " ...\n", " Virtual Machines Dsv5 Series Windows\n", " Standard_D64s_v5 Spot\n", - " 1.468006\n", - " USD\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", + " True\n", + " Standard_D64s_v5\n", + " NA\n", " \n", " \n", " 4\n", - " uknorth\n", - " Virtual Machines A Series Windows\n", - " A3 Spot\n", - " 0.190000\n", " USD\n", - " Virtual Machines\n", - " Compute\n", + " 0.0\n", + " 10.560000\n", + " 10.560000\n", + " uksouth\n", + " UK South\n", + " 2018-11-01T00:00:00Z\n", " NA\n", + " 0001d427-82df-4d83-8ab2-b60768527e08\n", + " E10 Disks\n", + " ...\n", + " Standard SSD Managed Disks\n", + " E10 LRS\n", + " Storage\n", + " DZH317F1HKN0\n", + " Storage\n", + " 1/Month\n", " Consumption\n", + " True\n", + " \n", + " NA\n", " \n", " \n", - " 6\n", - " westus\n", - " Virtual Machines Ebdsv5 Series\n", - " Standard_E2bds_v5 Spot\n", - " 0.075600\n", + " 5\n", " USD\n", + " 0.0\n", + " 0.190000\n", + " 0.190000\n", + " uknorth\n", + " UK North\n", + " 2019-10-16T00:00:00Z\n", + " NA\n", + " 0001e46a-9285-5fa8-b48a-240e307a24f7\n", + " A3 Spot\n", + " ...\n", + " Virtual Machines A Series Windows\n", + " A3 Spot\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", + " True\n", + " Standard_A3\n", + " NA\n", " \n", " \n", " 7\n", - " westindia\n", - " Virtual Machines Dv4 Series\n", - " D2 v4 Low Priority\n", - " 0.023600\n", " USD\n", - " Virtual Machines\n", - " Compute\n", + " 0.0\n", + " 0.075600\n", + " 0.075600\n", + " westus\n", + " US West\n", + " 2021-11-01T00:00:00Z\n", " NA\n", - " Consumption\n", - " \n", - " \n", - " 8\n", - " northeurope\n", - " Virtual Machines Esv5 Series\n", - " E2s v5 Spot\n", - " 0.036547\n", - " USD\n", + " 00026917-5c42-5cf2-994e-4037490635aa\n", + " E2bds v5 Spot\n", + " ...\n", + " Virtual Machines Ebdsv5 Series\n", + " Standard_E2bds_v5 Spot\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", + " True\n", + " Standard_E2bds_v5\n", + " NA\n", " \n", " \n", - " 9\n", - " eastus2\n", - " Virtual Machines Dsv5 Series Windows\n", - " Standard_D16s_v5\n", - " 1.504000\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", - " NA\n", - " Consumption\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", - " 12\n", - " australiasoutheast\n", - " Virtual Machines Eadsv5 Series Windows\n", - " E16-8ads v5 Spot\n", - " 0.537088\n", + " 91\n", " USD\n", + " 0.0\n", + " 4.838000\n", + " 4.838000\n", + " southcentralus\n", + " US South Central\n", + " 2020-08-01T00:00:00Z\n", + " NA\n", + " 0016083a-928f-56fd-8eeb-39287dcf676d\n", + " E64 v4\n", + " ...\n", + " Virtual Machines Ev4 Series\n", + " E64 v4\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", + " True\n", + " Standard_E64_v4\n", + " NA\n", " \n", " \n", - " 13\n", - " northcentralus\n", - " Virtual Machines Dv2 promo Series\n", - " D14 v2\n", - " 1.482000\n", + " 95\n", " USD\n", - " Virtual Machines\n", - " Compute\n", - " NA\n", - " Consumption\n", - " \n", - " \n", - " 14\n", - " northcentralus\n", - " Virtual Machines DSv2 promo Series\n", - " DS14 v2\n", - " 1.482000\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", + " 0.0\n", + " 0.212000\n", + " 0.212000\n", + " westcentralus\n", + " US West Central\n", + " 2021-11-01T00:00:00Z\n", " NA\n", - " Consumption\n", - " \n", - " \n", - " 15\n", - " brazilsouth\n", - " Virtual Machines A Series Basic\n", - " A2\n", - " 0.112000\n", - " USD\n", + " 00172462-4604-5a25-b1d4-f057577d68e0\n", + " E4ds v5 Low Priority\n", + " ...\n", + " Virtual Machines Edsv5 Series Windows\n", + " E4ds v5 Low Priority\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", - " \n", - " \n", - " 16\n", - " centralus\n", - " Virtual Machines Esv4 Series\n", - " E8-2s v4 Low Priority\n", - " 0.114000\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", + " True\n", + " Standard_E4ds_v5\n", " NA\n", - " Consumption\n", " \n", " \n", - " 17\n", - " koreasouth\n", - " Virtual Machines Dv5 Series Windows\n", - " Standard_D96_v5 Low Priority\n", - " 3.886000\n", + " 97\n", " USD\n", - " Virtual Machines\n", - " Compute\n", + " 0.0\n", + " 0.212000\n", + " 0.212000\n", + " westcentralus\n", + " US West Central\n", + " 2021-11-01T00:00:00Z\n", " NA\n", - " Consumption\n", - " \n", - " \n", - " 20\n", - " westeurope\n", - " Virtual Machines FS Series Windows\n", - " F16s Spot\n", - " 0.571308\n", - " USD\n", + " 00172462-4604-5a25-b1d4-f057577d68e0\n", + " E4-2ds v5 Low Priority\n", + " ...\n", + " Virtual Machines Edsv5 Series Windows\n", + " E4-2ds v5 Low Priority\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", - " \n", - " \n", - " 21\n", - " westindia\n", - " Virtual Machines DSv2 Series\n", - " DS4 v2 Spot\n", - " 0.090720\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", + " False\n", + " Standard_E4-2ds_v5\n", " NA\n", - " Consumption\n", " \n", " \n", - " 23\n", - " westus2\n", - " Virtual Machines Ddsv5 Series\n", - " Standard_D64ds_v5\n", - " 3.616000\n", + " 98\n", " USD\n", + " 0.0\n", + " 0.181440\n", + " 0.181440\n", + " southindia\n", + " IN South\n", + " 2022-03-01T00:00:00Z\n", + " 2022-03-31T23:59:00Z\n", + " 001752ab-2e87-599e-8fac-f1ada637ca61\n", + " D5 v2/DS5 v2 Spot\n", + " ...\n", + " Virtual Machines Dv2 Series\n", + " D5 v2 Spot\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", - " \n", - " \n", - " 25\n", - " japaneast\n", - " Virtual Machines Edv5 Series\n", - " Standard_E20d_v5 Low Priority\n", - " 0.348000\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", + " True\n", + " Standard_D5_v2\n", " NA\n", - " Consumption\n", " \n", " \n", - " 26\n", - " usgovtexas\n", - " Virtual Machines FS Series Windows\n", - " F16s Spot\n", - " 0.341510\n", + " 99\n", " USD\n", - " Virtual Machines\n", - " Compute\n", + " 0.0\n", + " 0.456000\n", + " 0.456000\n", + " canadacentral\n", + " CA Central\n", + " 2021-10-01T00:00:00Z\n", " NA\n", - " Consumption\n", - " \n", - " \n", - " 27\n", - " koreasouth\n", - " Easv4 Series Dedicated Host\n", - " Easv4 Type2\n", - " 7.603000\n", - " USD\n", + " 001790af-f893-596a-b4f9-7b0837df43e3\n", + " DS13 Low Priority\n", + " ...\n", + " Virtual Machines DS Series Windows\n", + " DS13 Low Priority\n", " Virtual Machines\n", + " DZH313Z7MMC8\n", " Compute\n", - " NA\n", + " 1 Hour\n", " Consumption\n", - " \n", - " \n", - " 30\n", - " eastus\n", - " DCasv5-series Linux\n", - " Standard_DC8as_v5 Low Priority\n", - " 0.108000\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", + " False\n", + " Standard_DS13\n", " NA\n", - " Consumption\n", " \n", - " \n", - " 31\n", - " southafricawest\n", - " Virtual Machines Ev3 Series\n", - " E20 v3 Low Priority\n", - " 0.420000\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", - " NA\n", - " Consumption\n", + " \n", + "\n", + "

72 rows × 22 columns

\n", + "" + ], + "text/plain": [ + " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", + "1 USD 0.0 0.542506 0.542506 southindia \n", + "3 USD 0.0 1.468006 1.468006 eastasia \n", + "4 USD 0.0 10.560000 10.560000 uksouth \n", + "5 USD 0.0 0.190000 0.190000 uknorth \n", + "7 USD 0.0 0.075600 0.075600 westus \n", + ".. ... ... ... ... ... \n", + "91 USD 0.0 4.838000 4.838000 southcentralus \n", + "95 USD 0.0 0.212000 0.212000 westcentralus \n", + "97 USD 0.0 0.212000 0.212000 westcentralus \n", + "98 USD 0.0 0.181440 0.181440 southindia \n", + "99 USD 0.0 0.456000 0.456000 canadacentral \n", + "\n", + " location effectiveStartDate effectiveEndDate \\\n", + "1 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "3 AP East 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "4 UK South 2018-11-01T00:00:00Z NA \n", + "5 UK North 2019-10-16T00:00:00Z NA \n", + "7 US West 2021-11-01T00:00:00Z NA \n", + ".. ... ... ... \n", + "91 US South Central 2020-08-01T00:00:00Z NA \n", + "95 US West Central 2021-11-01T00:00:00Z NA \n", + "97 US West Central 2021-11-01T00:00:00Z NA \n", + "98 IN South 2022-03-01T00:00:00Z 2022-03-31T23:59:00Z \n", + "99 CA Central 2021-10-01T00:00:00Z NA \n", + "\n", + " meterId meterName ... \\\n", + "1 000009d0-057f-5f2b-b7e9-9e26add324a8 D14/DS14 Spot ... \n", + "3 00014e7d-fff9-54dd-962e-4e992887ad3c D64s v5 Spot ... \n", + "4 0001d427-82df-4d83-8ab2-b60768527e08 E10 Disks ... \n", + "5 0001e46a-9285-5fa8-b48a-240e307a24f7 A3 Spot ... \n", + "7 00026917-5c42-5cf2-994e-4037490635aa E2bds v5 Spot ... \n", + ".. ... ... ... \n", + "91 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", + "95 00172462-4604-5a25-b1d4-f057577d68e0 E4ds v5 Low Priority ... \n", + "97 00172462-4604-5a25-b1d4-f057577d68e0 E4-2ds v5 Low Priority ... \n", + "98 001752ab-2e87-599e-8fac-f1ada637ca61 D5 v2/DS5 v2 Spot ... \n", + "99 001790af-f893-596a-b4f9-7b0837df43e3 DS13 Low Priority ... \n", + "\n", + " productName skuName \\\n", + "1 Virtual Machines D Series Windows D14 Spot \n", + "3 Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot \n", + "4 Standard SSD Managed Disks E10 LRS \n", + "5 Virtual Machines A Series Windows A3 Spot \n", + "7 Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot \n", + ".. ... ... \n", + "91 Virtual Machines Ev4 Series E64 v4 \n", + "95 Virtual Machines Edsv5 Series Windows E4ds v5 Low Priority \n", + "97 Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority \n", + "98 Virtual Machines Dv2 Series D5 v2 Spot \n", + "99 Virtual Machines DS Series Windows DS13 Low Priority \n", + "\n", + " serviceName serviceId serviceFamily unitOfMeasure type \\\n", + "1 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "3 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "4 Storage DZH317F1HKN0 Storage 1/Month Consumption \n", + "5 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "7 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + ".. ... ... ... ... ... \n", + "91 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "95 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "97 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "98 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "99 Virtual Machines DZH313Z7MMC8 Compute 1 Hour Consumption \n", + "\n", + " isPrimaryMeterRegion armSkuName reservationTerm \n", + "1 True Standard_D14 NA \n", + "3 True Standard_D64s_v5 NA \n", + "4 True NA \n", + "5 True Standard_A3 NA \n", + "7 True Standard_E2bds_v5 NA \n", + ".. ... ... ... \n", + "91 True Standard_E64_v4 NA \n", + "95 True Standard_E4ds_v5 NA \n", + "97 False Standard_E4-2ds_v5 NA \n", + "98 True Standard_D5_v2 NA \n", + "99 False Standard_DS13 NA \n", + "\n", + "[72 rows x 22 columns]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_consumption = df_items_2.loc[(df_items_2[\"type\"] == \"Consumption\")]\n", + "df_consumption" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-30T14:21:19.111848Z", + "start_time": "2022-03-30T14:21:18.953010Z" + } + }, + "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", " \n", @@ -1608,11 +1341,11 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -1620,23 +1353,23 @@ " \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", + " \n", " \n", " \n", " \n", @@ -1644,11 +1377,11 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -1656,23 +1389,23 @@ " \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", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -1680,11 +1413,11 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -1692,11 +1425,11 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -1704,11 +1437,11 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -1716,1187 +1449,214 @@ " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
armRegionNameproductNameskuNameretailPricecurrencyCodeserviceNameserviceFamilyreservationTermtype
32southafricawestVirtual Machines ESv3 SeriesE20s v3 Low Priority0.4200001southindiaVirtual Machines D Series WindowsD14 Spot0.542506USDVirtual MachinesComputeConsumption
34japaneastVirtual Machines A Series WindowsA30.4240003eastasiaVirtual Machines Dsv5 Series WindowsStandard_D64s_v5 Spot1.468006USDVirtual MachinesComputeConsumption
36australiasoutheastVirtual Machines F Series WindowsF16 Spot0.4030244uksouthStandard SSD Managed DisksE10 LRS10.560000USDVirtual MachinesComputeStorageStorageNAConsumption
37uaecentralVirtual Machines Ev4 SeriesE32 v4 Spot0.3145005uknorthVirtual Machines A Series WindowsA3 Spot0.190000USDVirtual MachinesComputeConsumption
38japaneastVirtual Machines Edsv5 SeriesE104ids v5 Low Priority1.9910007westusVirtual Machines Ebdsv5 SeriesStandard_E2bds_v5 Spot0.075600USDVirtual MachinesComputeConsumption
39switzerlandnorthVirtual Machines Ddsv5 Series WindowsStandard_D4ds_v50.483000USDVirtual MachinesComputeNAConsumption..............................
42japanwestVirtual Machines Ddsv5 Series WindowsStandard_D16ds_v5 Spot0.38993991southcentralusVirtual Machines Ev4 SeriesE64 v44.838000USDVirtual MachinesComputeConsumption
43southeastasiaVirtual Machines HCS SeriesHC44-32rs Spot0.41180095westcentralusVirtual Machines Edsv5 Series WindowsE4ds v5 Low Priority0.212000USDVirtual MachinesComputeConsumption
45australiaeastVirtual Machines Esv4 Series WindowsE64-16s v4 Spot2.05753097westcentralusVirtual Machines Edsv5 Series WindowsE4-2ds v5 Low Priority0.212000USDVirtual MachinesComputeConsumption
47usgovarizonaVirtual Machines Dsv4 SeriesD64s v43.87200098southindiaVirtual Machines Dv2 SeriesD5 v2 Spot0.181440USDVirtual MachinesComputeConsumption
50japanwestVirtual Machines Esv4 Series WindowsE64s v48.29400099canadacentralVirtual Machines DS Series WindowsDS13 Low Priority0.456000USDVirtual MachinesComputeNAConsumption
51canadacentralVirtual Machines Edsv4 Series WindowsE20ds v4 Low Priority1.000000USDVirtual MachinesComputeNAConsumption
54brazilsouthVirtual Machines MSv2 Series WindowsM416s v2 Spot17.373000USDVirtual MachinesComputeNAConsumption
55southcentralusVirtual Machines Ev4 SeriesE64 v44.838000USDVirtual MachinesComputeNAConsumption
59westcentralusVirtual Machines Edsv5 Series WindowsE4ds v5 Low Priority0.212000USDVirtual MachinesComputeNAConsumption
60westcentralusVirtual Machines Edsv5 Series WindowsE4-2ds v5 Low Priority0.212000USDVirtual MachinesComputeNAConsumption
62southindiaVirtual Machines Dv2 SeriesD5 v2 Spot0.181440USDVirtual MachinesComputeNAConsumption
63canadacentralVirtual Machines DS Series WindowsDS13 Low Priority0.456000USDVirtual MachinesComputeNAConsumption
66canadacentralVirtual Machines D Series WindowsD13 Low Priority0.456000USDVirtual MachinesComputeNAConsumption
67usgovarizonaVirtual Machines NVasv4 SeriesNV4as v4 Spot0.039110USDVirtual MachinesComputeNAConsumption
68eastus2Virtual Machines Eadsv5 SeriesE8-4ads v5 Low Priority0.105000USDVirtual MachinesComputeNAConsumption
69australiacentral2Virtual Machines Esv5 SeriesE48s v5 Spot1.449600USDVirtual MachinesComputeNAConsumption
71southindiaVirtual Machines MS Series WindowsM128 Low Priority10.440000USDVirtual MachinesComputeNAConsumption
72uaenorthVirtual Machines DSv3 Series WindowsD16s v3 Spot0.338691USDVirtual MachinesComputeNAConsumption
74northeuropeVirtual Machines Ev5 SeriesStandard_E96_v56.768000USDVirtual MachinesComputeNAConsumption
78uknorthVirtual Machines Ev3 Series WindowsE64 v3 Spot3.224400USDVirtual MachinesComputeNAConsumption
79canadaeastVirtual Machines Esv5 SeriesE4s v5 Low Priority0.055200USDVirtual MachinesComputeNAConsumption
80canadaeastVirtual Machines Esv5 SeriesE4-2s v5 Low Priority0.055200USDVirtual MachinesComputeNAConsumption
81westus2Virtual Machines Ev3 Series WindowsE48 v3 Low Priority2.093000USDVirtual MachinesComputeNAConsumption
83westus2Virtual Machines ESv3 Series WindowsE48s v3 Low Priority2.093000USDVirtual MachinesComputeNAConsumption
85uaecentralVirtual Machines Ev4 SeriesE16 v4 Spot0.157200USDVirtual MachinesComputeNAConsumption
86centralusVirtual Machines A Series WindowsA3 Spot0.054000USDVirtual MachinesComputeNAConsumption
88southafricawestVirtual Machines Edsv4 Series WindowsE16ds v4 Spot0.538474USDVirtual MachinesComputeNAConsumption
90westindiaVirtual Machines Edsv4 Series WindowsE48ds v4 Low Priority2.551000USDVirtual MachinesComputeNAConsumption
92westus2Virtual Machines Ddsv4 SeriesD64ds v4 Low Priority0.723000USDVirtual MachinesComputeNAConsumption
94australiacentralVirtual Machines Edsv4 Series WindowsE8-2ds v4 Spot0.184710USDVirtual MachinesComputeNAConsumption
96uaecentralVirtual Machines Ddsv5 Series WindowsStandard_D2ds_v50.272000USDVirtual MachinesComputeNAConsumption
97uksouthVirtual Machines Dsv5 Series WindowsStandard_D48s_v5 Low Priority1.949000USDVirtual MachinesComputeNAConsumption
99eastus2Virtual Machines MdSv2 Series WindowsM192idms_v240.896000USDVirtual MachinesComputeNAConsumption
\n", - "
" - ], - "text/plain": [ - " armRegionName productName \\\n", - "1 southindia Virtual Machines D Series Windows \n", - "3 eastasia Virtual Machines Dsv5 Series Windows \n", - "4 uknorth Virtual Machines A Series Windows \n", - "6 westus Virtual Machines Ebdsv5 Series \n", - "7 westindia Virtual Machines Dv4 Series \n", - "8 northeurope Virtual Machines Esv5 Series \n", - "9 eastus2 Virtual Machines Dsv5 Series Windows \n", - "12 australiasoutheast Virtual Machines Eadsv5 Series Windows \n", - "13 northcentralus Virtual Machines Dv2 promo Series \n", - "14 northcentralus Virtual Machines DSv2 promo Series \n", - "15 brazilsouth Virtual Machines A Series Basic \n", - "16 centralus Virtual Machines Esv4 Series \n", - "17 koreasouth Virtual Machines Dv5 Series Windows \n", - "20 westeurope Virtual Machines FS Series Windows \n", - "21 westindia Virtual Machines DSv2 Series \n", - "23 westus2 Virtual Machines Ddsv5 Series \n", - "25 japaneast Virtual Machines Edv5 Series \n", - "26 usgovtexas Virtual Machines FS Series Windows \n", - "27 koreasouth Easv4 Series Dedicated Host \n", - "30 eastus DCasv5-series Linux \n", - "31 southafricawest Virtual Machines Ev3 Series \n", - "32 southafricawest Virtual Machines ESv3 Series \n", - "34 japaneast Virtual Machines A Series Windows \n", - "36 australiasoutheast Virtual Machines F Series Windows \n", - "37 uaecentral Virtual Machines Ev4 Series \n", - "38 japaneast Virtual Machines Edsv5 Series \n", - "39 switzerlandnorth Virtual Machines Ddsv5 Series Windows \n", - "42 japanwest Virtual Machines Ddsv5 Series Windows \n", - "43 southeastasia Virtual Machines HCS Series \n", - "45 australiaeast Virtual Machines Esv4 Series Windows \n", - "47 usgovarizona Virtual Machines Dsv4 Series \n", - "50 japanwest Virtual Machines Esv4 Series Windows \n", - "51 canadacentral Virtual Machines Edsv4 Series Windows \n", - "54 brazilsouth Virtual Machines MSv2 Series Windows \n", - "55 southcentralus Virtual Machines Ev4 Series \n", - "59 westcentralus Virtual Machines Edsv5 Series Windows \n", - "60 westcentralus Virtual Machines Edsv5 Series Windows \n", - "62 southindia Virtual Machines Dv2 Series \n", - "63 canadacentral Virtual Machines DS Series Windows \n", - "66 canadacentral Virtual Machines D Series Windows \n", - "67 usgovarizona Virtual Machines NVasv4 Series \n", - "68 eastus2 Virtual Machines Eadsv5 Series \n", - "69 australiacentral2 Virtual Machines Esv5 Series \n", - "71 southindia Virtual Machines MS Series Windows \n", - "72 uaenorth Virtual Machines DSv3 Series Windows \n", - "74 northeurope Virtual Machines Ev5 Series \n", - "78 uknorth Virtual Machines Ev3 Series Windows \n", - "79 canadaeast Virtual Machines Esv5 Series \n", - "80 canadaeast Virtual Machines Esv5 Series \n", - "81 westus2 Virtual Machines Ev3 Series Windows \n", - "83 westus2 Virtual Machines ESv3 Series Windows \n", - "85 uaecentral Virtual Machines Ev4 Series \n", - "86 centralus Virtual Machines A Series Windows \n", - "88 southafricawest Virtual Machines Edsv4 Series Windows \n", - "90 westindia Virtual Machines Edsv4 Series Windows \n", - "92 westus2 Virtual Machines Ddsv4 Series \n", - "94 australiacentral Virtual Machines Edsv4 Series Windows \n", - "96 uaecentral Virtual Machines Ddsv5 Series Windows \n", - "97 uksouth Virtual Machines Dsv5 Series Windows \n", - "99 eastus2 Virtual Machines MdSv2 Series Windows \n", - "\n", - " skuName retailPrice currencyCode \\\n", - "1 D14 Spot 0.542506 USD \n", - "3 Standard_D64s_v5 Spot 1.468006 USD \n", - "4 A3 Spot 0.190000 USD \n", - "6 Standard_E2bds_v5 Spot 0.075600 USD \n", - "7 D2 v4 Low Priority 0.023600 USD \n", - "8 E2s v5 Spot 0.036547 USD \n", - "9 Standard_D16s_v5 1.504000 USD \n", - "12 E16-8ads v5 Spot 0.537088 USD \n", - "13 D14 v2 1.482000 USD \n", - "14 DS14 v2 1.482000 USD \n", - "15 A2 0.112000 USD \n", - "16 E8-2s v4 Low Priority 0.114000 USD \n", - "17 Standard_D96_v5 Low Priority 3.886000 USD \n", - "20 F16s Spot 0.571308 USD \n", - "21 DS4 v2 Spot 0.090720 USD \n", - "23 Standard_D64ds_v5 3.616000 USD \n", - "25 Standard_E20d_v5 Low Priority 0.348000 USD \n", - "26 F16s Spot 0.341510 USD \n", - "27 Easv4 Type2 7.603000 USD \n", - "30 Standard_DC8as_v5 Low Priority 0.108000 USD \n", - "31 E20 v3 Low Priority 0.420000 USD \n", - "32 E20s v3 Low Priority 0.420000 USD \n", - "34 A3 0.424000 USD \n", - "36 F16 Spot 0.403024 USD \n", - "37 E32 v4 Spot 0.314500 USD \n", - "38 E104ids v5 Low Priority 1.991000 USD \n", - "39 Standard_D4ds_v5 0.483000 USD \n", - "42 Standard_D16ds_v5 Spot 0.389939 USD \n", - "43 HC44-32rs Spot 0.411800 USD \n", - "45 E64-16s v4 Spot 2.057530 USD \n", - "47 D64s v4 3.872000 USD \n", - "50 E64s v4 8.294000 USD \n", - "51 E20ds v4 Low Priority 1.000000 USD \n", - "54 M416s v2 Spot 17.373000 USD \n", - "55 E64 v4 4.838000 USD \n", - "59 E4ds v5 Low Priority 0.212000 USD \n", - "60 E4-2ds v5 Low Priority 0.212000 USD \n", - "62 D5 v2 Spot 0.181440 USD \n", - "63 DS13 Low Priority 0.456000 USD \n", - "66 D13 Low Priority 0.456000 USD \n", - "67 NV4as v4 Spot 0.039110 USD \n", - "68 E8-4ads v5 Low Priority 0.105000 USD \n", - "69 E48s v5 Spot 1.449600 USD \n", - "71 M128 Low Priority 10.440000 USD \n", - "72 D16s v3 Spot 0.338691 USD \n", - "74 Standard_E96_v5 6.768000 USD \n", - "78 E64 v3 Spot 3.224400 USD \n", - "79 E4s v5 Low Priority 0.055200 USD \n", - "80 E4-2s v5 Low Priority 0.055200 USD \n", - "81 E48 v3 Low Priority 2.093000 USD \n", - "83 E48s v3 Low Priority 2.093000 USD \n", - "85 E16 v4 Spot 0.157200 USD \n", - "86 A3 Spot 0.054000 USD \n", - "88 E16ds v4 Spot 0.538474 USD \n", - "90 E48ds v4 Low Priority 2.551000 USD \n", - "92 D64ds v4 Low Priority 0.723000 USD \n", - "94 E8-2ds v4 Spot 0.184710 USD \n", - "96 Standard_D2ds_v5 0.272000 USD \n", - "97 Standard_D48s_v5 Low Priority 1.949000 USD \n", - "99 M192idms_v2 40.896000 USD \n", - "\n", - " serviceName serviceFamily reservationTerm type \n", - "1 Virtual Machines Compute NA Consumption \n", - "3 Virtual Machines Compute NA Consumption \n", - "4 Virtual Machines Compute NA Consumption \n", - "6 Virtual Machines Compute NA Consumption \n", - "7 Virtual Machines Compute NA Consumption \n", - "8 Virtual Machines Compute NA Consumption \n", - "9 Virtual Machines Compute NA Consumption \n", - "12 Virtual Machines Compute NA Consumption \n", - "13 Virtual Machines Compute NA Consumption \n", - "14 Virtual Machines Compute NA Consumption \n", - "15 Virtual Machines Compute NA Consumption \n", - "16 Virtual Machines Compute NA Consumption \n", - "17 Virtual Machines Compute NA Consumption \n", - "20 Virtual Machines Compute NA Consumption \n", - "21 Virtual Machines Compute NA Consumption \n", - "23 Virtual Machines Compute NA Consumption \n", - "25 Virtual Machines Compute NA Consumption \n", - "26 Virtual Machines Compute NA Consumption \n", - "27 Virtual Machines Compute NA Consumption \n", - "30 Virtual Machines Compute NA Consumption \n", - "31 Virtual Machines Compute NA Consumption \n", - "32 Virtual Machines Compute NA Consumption \n", - "34 Virtual Machines Compute NA Consumption \n", - "36 Virtual Machines Compute NA Consumption \n", - "37 Virtual Machines Compute NA Consumption \n", - "38 Virtual Machines Compute NA Consumption \n", - "39 Virtual Machines Compute NA Consumption \n", - "42 Virtual Machines Compute NA Consumption \n", - "43 Virtual Machines Compute NA Consumption \n", - "45 Virtual Machines Compute NA Consumption \n", - "47 Virtual Machines Compute NA Consumption \n", - "50 Virtual Machines Compute NA Consumption \n", - "51 Virtual Machines Compute NA Consumption \n", - "54 Virtual Machines Compute NA Consumption \n", - "55 Virtual Machines Compute NA Consumption \n", - "59 Virtual Machines Compute NA Consumption \n", - "60 Virtual Machines Compute NA Consumption \n", - "62 Virtual Machines Compute NA Consumption \n", - "63 Virtual Machines Compute NA Consumption \n", - "66 Virtual Machines Compute NA Consumption \n", - "67 Virtual Machines Compute NA Consumption \n", - "68 Virtual Machines Compute NA Consumption \n", - "69 Virtual Machines Compute NA Consumption \n", - "71 Virtual Machines Compute NA Consumption \n", - "72 Virtual Machines Compute NA Consumption \n", - "74 Virtual Machines Compute NA Consumption \n", - "78 Virtual Machines Compute NA Consumption \n", - "79 Virtual Machines Compute NA Consumption \n", - "80 Virtual Machines Compute NA Consumption \n", - "81 Virtual Machines Compute NA Consumption \n", - "83 Virtual Machines Compute NA Consumption \n", - "85 Virtual Machines Compute NA Consumption \n", - "86 Virtual Machines Compute NA Consumption \n", - "88 Virtual Machines Compute NA Consumption \n", - "90 Virtual Machines Compute NA Consumption \n", - "92 Virtual Machines Compute NA Consumption \n", - "94 Virtual Machines Compute NA Consumption \n", - "96 Virtual Machines Compute NA Consumption \n", - "97 Virtual Machines Compute NA Consumption \n", - "99 Virtual Machines Compute NA Consumption " - ] - }, - "execution_count": 56, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dfi_consumption = df_consumption[\n", - " [\n", - " \"armRegionName\",\n", - " \"productName\",\n", - " \"skuName\",\n", - " \"retailPrice\",\n", - " \"currencyCode\",\n", - " \"serviceName\",\n", - " \"serviceFamily\",\n", - " \"reservationTerm\",\n", - " \"type\",\n", - " ]\n", - "]\n", - "dfi_consumption" - ] - }, - { - "cell_type": "markdown", - "id": "48943c2d", - "metadata": {}, - "source": [ - "#### Group by columns ('armRegionName','productName','skuName','serviceName','serviceFamily') to get region wise Max Price and Min Price" - ] - }, - { - "cell_type": "code", - "execution_count": 57, - "id": "da6d1522", - "metadata": { - "ExecuteTime": { - "end_time": "2022-03-29T14:13:15.529778Z", - "start_time": "2022-03-29T14:13:15.401636Z" - } - }, - "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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \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", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + "
maxPriceminPrice
armRegionNameproductNameskuNameserviceNameserviceFamilyreservationTermtype
australiacentralVirtual Machines Edsv4 Series WindowsE8-2ds v4 SpotVirtual MachinesComputeNAConsumption0.1847100.184710
australiacentral2Virtual Machines Esv5 SeriesE48s v5 SpotVirtual MachinesComputeNAConsumption1.4496001.449600
australiaeastVirtual Machines Esv4 Series WindowsE64-16s v4 SpotVirtual MachinesComputeNAConsumption2.0575302.057530
australiasoutheastVirtual Machines Eadsv5 Series WindowsE16-8ads v5 SpotVirtual MachinesComputeNAConsumption0.5370880.537088
Virtual Machines F Series WindowsF16 SpotVirtual MachinesComputeNAConsumption0.4030240.403024
brazilsouthVirtual Machines A Series BasicA2Virtual MachinesComputeNAConsumption0.1120000.112000
Virtual Machines MSv2 Series WindowsM416s v2 SpotVirtual MachinesComputeNAConsumption17.37300017.373000
canadacentralVirtual Machines D Series WindowsD13 Low PriorityVirtual MachinesComputeNAConsumption0.4560000.456000
Virtual Machines DS Series WindowsDS13 Low PriorityVirtual MachinesComputeNAConsumption0.4560000.456000
Virtual Machines Edsv4 Series WindowsE20ds v4 Low PriorityVirtual MachinesComputeNAConsumption1.0000001.000000
canadaeastVirtual Machines Esv5 SeriesE4-2s v5 Low PriorityVirtual MachinesComputeNAConsumption0.0552000.055200
E4s v5 Low PriorityVirtual MachinesComputeNAConsumption0.0552000.055200
centralusVirtual Machines A Series WindowsA3 SpotVirtual MachinesComputeNAConsumption0.0540000.054000
Virtual Machines Esv4 SeriesE8-2s v4 Low PriorityVirtual MachinesComputeNAConsumption0.1140000.114000
eastasiaVirtual Machines Dsv5 Series WindowsStandard_D64s_v5 SpotVirtual MachinesComputeNAConsumption1.4680061.468006
eastusDCasv5-series LinuxStandard_DC8as_v5 Low PriorityVirtual MachinesComputeNAConsumption0.1080000.108000
eastus2Virtual Machines Dsv5 Series WindowsStandard_D16s_v5Virtual MachinesComputeNAConsumption1.5040001.504000
Virtual Machines Eadsv5 SeriesE8-4ads v5 Low PriorityVirtual MachinesComputeNAConsumption0.1050000.105000
Virtual Machines MdSv2 Series WindowsM192idms_v2Virtual MachinesComputeNAConsumption40.89600040.896000
japaneastVirtual Machines A Series WindowsA3Virtual MachinesComputeNAConsumption0.4240000.424000
Virtual Machines Edsv5 SeriesE104ids v5 Low PriorityVirtual MachinesComputeNAConsumption1.9910001.991000
Virtual Machines Edv5 SeriesStandard_E20d_v5 Low PriorityVirtual MachinesComputeNAConsumption0.3480000.348000
japanwestVirtual Machines Ddsv5 Series WindowsStandard_D16ds_v5 SpotVirtual MachinesComputeNAConsumption0.3899390.389939
Virtual Machines Esv4 Series WindowsE64s v4Virtual MachinesComputeNAConsumption8.2940008.294000
koreasouthEasv4 Series Dedicated HostEasv4 Type2Virtual MachinesComputeNAConsumption7.6030007.603000
Virtual Machines Dv5 Series WindowsStandard_D96_v5 Low PriorityVirtual MachinesComputeNAConsumption3.8860003.886000
northcentralusVirtual Machines DSv2 promo SeriesDS14 v2Virtual MachinesComputeNAConsumption1.4820001.482000
Virtual Machines Dv2 promo SeriesD14 v2Virtual MachinesComputeNAConsumption1.4820001.482000
northeuropeVirtual Machines Esv5 SeriesE2s v5 SpotVirtual MachinesComputeNAConsumption0.0365470.036547
Virtual Machines Ev5 SeriesStandard_E96_v5Virtual MachinesComputeNAConsumption6.7680006.768000
southafricawestVirtual Machines ESv3 SeriesE20s v3 Low PriorityVirtual MachinesComputeNAConsumption0.4200000.420000
Virtual Machines Edsv4 Series WindowsE16ds v4 SpotVirtual MachinesComputeNAConsumption0.5384740.538474
Virtual Machines Ev3 SeriesE20 v3 Low PriorityVirtual MachinesComputeNAConsumption0.4200000.420000
southcentralusVirtual Machines Ev4 SeriesE64 v4Virtual MachinesComputeNAConsumption4.8380004.838000
southeastasiaVirtual Machines HCS SeriesHC44-32rs SpotVirtual MachinesComputeNAConsumption0.4118000.411800
southindiaVirtual Machines D Series WindowsD14 SpotVirtual MachinesComputeNAConsumption0.5425060.542506
Virtual Machines Dv2 SeriesD5 v2 SpotVirtual MachinesComputeNAConsumption0.1814400.181440
Virtual Machines MS Series WindowsM128 Low PriorityVirtual MachinesComputeNAConsumption10.44000010.440000
switzerlandnorthVirtual Machines Ddsv5 Series WindowsStandard_D4ds_v5Virtual MachinesComputeNAConsumption0.4830000.483000
uaecentralVirtual Machines Ddsv5 Series WindowsStandard_D2ds_v5Virtual MachinesComputeNAConsumption0.2720000.272000
Virtual Machines Ev4 SeriesE16 v4 SpotVirtual MachinesComputeNAConsumption0.1572000.157200
E32 v4 SpotVirtual MachinesComputeNAConsumption0.3145000.314500
uaenorthVirtual Machines DSv3 Series WindowsD16s v3 SpotVirtual MachinesComputeNAConsumption0.3386910.338691
uknorthVirtual Machines A Series WindowsA3 SpotVirtual MachinesComputeNAConsumption0.1900000.190000
Virtual Machines Ev3 Series WindowsE64 v3 SpotVirtual MachinesComputeNAConsumption3.2244003.224400ComputeNAConsumption
uksouthVirtual Machines Dsv5 Series WindowsStandard_D48s_v5 Low PriorityVirtual MachinesComputeNAConsumption1.9490001.949000
\n", + "

72 rows × 9 columns

\n", + "
" + ], + "text/plain": [ + " armRegionName productName \\\n", + "1 southindia Virtual Machines D Series Windows \n", + "3 eastasia Virtual Machines Dsv5 Series Windows \n", + "4 uksouth Standard SSD Managed Disks \n", + "5 uknorth Virtual Machines A Series Windows \n", + "7 westus Virtual Machines Ebdsv5 Series \n", + ".. ... ... \n", + "91 southcentralus Virtual Machines Ev4 Series \n", + "95 westcentralus Virtual Machines Edsv5 Series Windows \n", + "97 westcentralus Virtual Machines Edsv5 Series Windows \n", + "98 southindia Virtual Machines Dv2 Series \n", + "99 canadacentral Virtual Machines DS Series Windows \n", + "\n", + " skuName retailPrice currencyCode serviceName \\\n", + "1 D14 Spot 0.542506 USD Virtual Machines \n", + "3 Standard_D64s_v5 Spot 1.468006 USD Virtual Machines \n", + "4 E10 LRS 10.560000 USD Storage \n", + "5 A3 Spot 0.190000 USD Virtual Machines \n", + "7 Standard_E2bds_v5 Spot 0.075600 USD Virtual Machines \n", + ".. ... ... ... ... \n", + "91 E64 v4 4.838000 USD Virtual Machines \n", + "95 E4ds v5 Low Priority 0.212000 USD Virtual Machines \n", + "97 E4-2ds v5 Low Priority 0.212000 USD Virtual Machines \n", + "98 D5 v2 Spot 0.181440 USD Virtual Machines \n", + "99 DS13 Low Priority 0.456000 USD Virtual Machines \n", + "\n", + " serviceFamily reservationTerm type \n", + "1 Compute NA Consumption \n", + "3 Compute NA Consumption \n", + "4 Storage NA Consumption \n", + "5 Compute NA Consumption \n", + "7 Compute NA Consumption \n", + ".. ... ... ... \n", + "91 Compute NA Consumption \n", + "95 Compute NA Consumption \n", + "97 Compute NA Consumption \n", + "98 Compute NA Consumption \n", + "99 Compute NA Consumption \n", + "\n", + "[72 rows x 9 columns]" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dfi_consumption = df_consumption[\n", + " [\n", + " \"armRegionName\",\n", + " \"productName\",\n", + " \"skuName\",\n", + " \"retailPrice\",\n", + " \"currencyCode\",\n", + " \"serviceName\",\n", + " \"serviceFamily\",\n", + " \"reservationTerm\",\n", + " \"type\",\n", + " ]\n", + "]\n", + "dfi_consumption" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Group by few columns to get region wise Max Price and Min Price" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "ExecuteTime": { + "end_time": "2022-03-30T14:21:19.321020Z", + "start_time": "2022-03-30T14:21:19.119142Z" + } + }, + "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", + " \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", " \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", - " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", + " \n", " \n", " \n", " \n", @@ -2907,17 +1667,17 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", - " \n", " \n", " \n", " \n", @@ -2928,17 +1688,7 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -2949,158 +1699,54 @@ " \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", "
maxPriceminPrice
usgovarizonaVirtual Machines Dsv4 SeriesD64s v4Virtual MachinesComputeNAConsumption3.8720003.872000armRegionNameproductNameskuNameserviceNameserviceFamilyreservationTermtype
Virtual Machines NVasv4 SeriesNV4as v4 SpotVirtual MachinesSQL Server Web Red Hat Enterprise Linux7 vCPU VMVirtual Machines LicensesComputeNAConsumption0.0391100.0391100.1860000.186000
usgovtexasVirtual Machines FS Series WindowsF16s SpotaustraliaeastVirtual Machines Esv4 Series WindowsE64-16s v4 SpotVirtual MachinesComputeNAConsumption0.3415100.3415102.0575302.057530
westcentralusVirtual Machines Edsv5 Series WindowsE4-2ds v5 Low PriorityaustraliasoutheastVirtual Machines Eadsv5 Series WindowsE16-8ads v5 SpotVirtual MachinesComputeNAConsumption0.2120000.2120000.5370880.537088
E4ds v5 Low PriorityVirtual Machines F Series WindowsF16 SpotVirtual MachinesComputeNAConsumption0.2120000.2120000.4030240.403024
westeuropeVirtual Machines FS Series WindowsF16s SpotbrazilsouthVirtual Machines A Series BasicA2Virtual MachinesComputeNAConsumption0.5713080.5713080.1120000.112000
westindiaVirtual Machines DSv2 SeriesDS4 v2 SpotVirtual MachinesComputeNAConsumption0.0907200.090720...........................
westindiaVirtual Machines Dv4 SeriesD2 v4 Low PriorityVirtual Machines0.023600
Virtual Machines Edsv4 Series WindowsE48ds v4 Low PriorityVirtual MachinesComputewestusPremium ADLS Gen2 Hierarchical NamespacePremium ZRSStorageStorageNAConsumption2.5510002.5510000.1130000.113000
westusVirtual Machines Ebdsv5 SeriesStandard_E2bds_v5 SpotVirtual Machines0.075600
westus2Virtual Machines Ddsv4 SeriesD64ds v4 Low PriorityVirtual MachinesComputeNAConsumption0.7230000.723000
westus2Virtual Machines Ddsv5 SeriesStandard_D64ds_v5Virtual Machines3.616000
Virtual Machines ESv3 Series WindowsE48s v3 Low PriorityVirtual MachinesComputeNAConsumption2.0930002.093000
Virtual Machines Ev3 Series WindowsE48 v3 Low PriorityVirtual MachinesComputewestus3Azure Redis Cache Enterprise FlashF1500Redis CacheDatabasesNAConsumption2.0930002.09300010.43000010.430000
\n", + "

67 rows × 2 columns

\n", "
" ], "text/plain": [ - " maxPrice \\\n", - "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", - "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute NA Consumption 0.184710 \n", - "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute NA Consumption 1.449600 \n", - "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute NA Consumption 2.057530 \n", - "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute NA Consumption 0.537088 \n", - " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute NA Consumption 0.403024 \n", - "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute NA Consumption 0.112000 \n", - " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute NA Consumption 17.373000 \n", - "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", - " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", - " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute NA Consumption 1.000000 \n", - "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", - " E4s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", - "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.054000 \n", - " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute NA Consumption 0.114000 \n", - "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute NA Consumption 1.468006 \n", - "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute NA Consumption 0.108000 \n", - "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute NA Consumption 1.504000 \n", - " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute NA Consumption 0.105000 \n", - " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute NA Consumption 40.896000 \n", - "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute NA Consumption 0.424000 \n", - " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute NA Consumption 1.991000 \n", - " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute NA Consumption 0.348000 \n", - "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute NA Consumption 0.389939 \n", - " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute NA Consumption 8.294000 \n", - "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute NA Consumption 7.603000 \n", - " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute NA Consumption 3.886000 \n", - "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", - " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", - "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute NA Consumption 0.036547 \n", - " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute NA Consumption 6.768000 \n", - "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", - " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute NA Consumption 0.538474 \n", - " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", - "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute NA Consumption 4.838000 \n", - "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute NA Consumption 0.411800 \n", - "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute NA Consumption 0.542506 \n", - " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute NA Consumption 0.181440 \n", - " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute NA Consumption 10.440000 \n", - "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute NA Consumption 0.483000 \n", - "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute NA Consumption 0.272000 \n", - " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute NA Consumption 0.157200 \n", - " E32 v4 Spot Virtual Machines Compute NA Consumption 0.314500 \n", - "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute NA Consumption 0.338691 \n", - "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.190000 \n", - " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute NA Consumption 3.224400 \n", - "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute NA Consumption 1.949000 \n", - "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute NA Consumption 3.872000 \n", - " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute NA Consumption 0.039110 \n", - "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.341510 \n", - "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", - " E4ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", - "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.571308 \n", - "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute NA Consumption 0.090720 \n", - " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute NA Consumption 0.023600 \n", - " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute NA Consumption 2.551000 \n", - "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute NA Consumption 0.075600 \n", - "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute NA Consumption 0.723000 \n", - " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute NA Consumption 3.616000 \n", - " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 \n", - " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 \n", + " maxPrice \\\n", + "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", + " SQL Server Web Red Hat Enterprise Linux 7 vCPU VM Virtual Machines Licenses Compute NA Consumption 0.186000 \n", + "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute NA Consumption 2.057530 \n", + "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute NA Consumption 0.537088 \n", + " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute NA Consumption 0.403024 \n", + "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute NA Consumption 0.112000 \n", + "... ... \n", + "westindia Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute NA Consumption 0.023600 \n", + "westus Premium ADLS Gen2 Hierarchical Namespace Premium ZRS Storage Storage NA Consumption 0.113000 \n", + " Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute NA Consumption 0.075600 \n", + "westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute NA Consumption 3.616000 \n", + "westus3 Azure Redis Cache Enterprise Flash F1500 Redis Cache Databases NA Consumption 10.430000 \n", "\n", - " minPrice \n", - "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", - "australiacentral Virtual Machines Edsv4 Series Windows E8-2ds v4 Spot Virtual Machines Compute NA Consumption 0.184710 \n", - "australiacentral2 Virtual Machines Esv5 Series E48s v5 Spot Virtual Machines Compute NA Consumption 1.449600 \n", - "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute NA Consumption 2.057530 \n", - "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute NA Consumption 0.537088 \n", - " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute NA Consumption 0.403024 \n", - "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute NA Consumption 0.112000 \n", - " Virtual Machines MSv2 Series Windows M416s v2 Spot Virtual Machines Compute NA Consumption 17.373000 \n", - "canadacentral Virtual Machines D Series Windows D13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", - " Virtual Machines DS Series Windows DS13 Low Priority Virtual Machines Compute NA Consumption 0.456000 \n", - " Virtual Machines Edsv4 Series Windows E20ds v4 Low Priority Virtual Machines Compute NA Consumption 1.000000 \n", - "canadaeast Virtual Machines Esv5 Series E4-2s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", - " E4s v5 Low Priority Virtual Machines Compute NA Consumption 0.055200 \n", - "centralus Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.054000 \n", - " Virtual Machines Esv4 Series E8-2s v4 Low Priority Virtual Machines Compute NA Consumption 0.114000 \n", - "eastasia Virtual Machines Dsv5 Series Windows Standard_D64s_v5 Spot Virtual Machines Compute NA Consumption 1.468006 \n", - "eastus DCasv5-series Linux Standard_DC8as_v5 Low Priority Virtual Machines Compute NA Consumption 0.108000 \n", - "eastus2 Virtual Machines Dsv5 Series Windows Standard_D16s_v5 Virtual Machines Compute NA Consumption 1.504000 \n", - " Virtual Machines Eadsv5 Series E8-4ads v5 Low Priority Virtual Machines Compute NA Consumption 0.105000 \n", - " Virtual Machines MdSv2 Series Windows M192idms_v2 Virtual Machines Compute NA Consumption 40.896000 \n", - "japaneast Virtual Machines A Series Windows A3 Virtual Machines Compute NA Consumption 0.424000 \n", - " Virtual Machines Edsv5 Series E104ids v5 Low Priority Virtual Machines Compute NA Consumption 1.991000 \n", - " Virtual Machines Edv5 Series Standard_E20d_v5 Low Priority Virtual Machines Compute NA Consumption 0.348000 \n", - "japanwest Virtual Machines Ddsv5 Series Windows Standard_D16ds_v5 Spot Virtual Machines Compute NA Consumption 0.389939 \n", - " Virtual Machines Esv4 Series Windows E64s v4 Virtual Machines Compute NA Consumption 8.294000 \n", - "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute NA Consumption 7.603000 \n", - " Virtual Machines Dv5 Series Windows Standard_D96_v5 Low Priority Virtual Machines Compute NA Consumption 3.886000 \n", - "northcentralus Virtual Machines DSv2 promo Series DS14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", - " Virtual Machines Dv2 promo Series D14 v2 Virtual Machines Compute NA Consumption 1.482000 \n", - "northeurope Virtual Machines Esv5 Series E2s v5 Spot Virtual Machines Compute NA Consumption 0.036547 \n", - " Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute NA Consumption 6.768000 \n", - "southafricawest Virtual Machines ESv3 Series E20s v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", - " Virtual Machines Edsv4 Series Windows E16ds v4 Spot Virtual Machines Compute NA Consumption 0.538474 \n", - " Virtual Machines Ev3 Series E20 v3 Low Priority Virtual Machines Compute NA Consumption 0.420000 \n", - "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute NA Consumption 4.838000 \n", - "southeastasia Virtual Machines HCS Series HC44-32rs Spot Virtual Machines Compute NA Consumption 0.411800 \n", - "southindia Virtual Machines D Series Windows D14 Spot Virtual Machines Compute NA Consumption 0.542506 \n", - " Virtual Machines Dv2 Series D5 v2 Spot Virtual Machines Compute NA Consumption 0.181440 \n", - " Virtual Machines MS Series Windows M128 Low Priority Virtual Machines Compute NA Consumption 10.440000 \n", - "switzerlandnorth Virtual Machines Ddsv5 Series Windows Standard_D4ds_v5 Virtual Machines Compute NA Consumption 0.483000 \n", - "uaecentral Virtual Machines Ddsv5 Series Windows Standard_D2ds_v5 Virtual Machines Compute NA Consumption 0.272000 \n", - " Virtual Machines Ev4 Series E16 v4 Spot Virtual Machines Compute NA Consumption 0.157200 \n", - " E32 v4 Spot Virtual Machines Compute NA Consumption 0.314500 \n", - "uaenorth Virtual Machines DSv3 Series Windows D16s v3 Spot Virtual Machines Compute NA Consumption 0.338691 \n", - "uknorth Virtual Machines A Series Windows A3 Spot Virtual Machines Compute NA Consumption 0.190000 \n", - " Virtual Machines Ev3 Series Windows E64 v3 Spot Virtual Machines Compute NA Consumption 3.224400 \n", - "uksouth Virtual Machines Dsv5 Series Windows Standard_D48s_v5 Low Priority Virtual Machines Compute NA Consumption 1.949000 \n", - "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute NA Consumption 3.872000 \n", - " Virtual Machines NVasv4 Series NV4as v4 Spot Virtual Machines Compute NA Consumption 0.039110 \n", - "usgovtexas Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.341510 \n", - "westcentralus Virtual Machines Edsv5 Series Windows E4-2ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", - " E4ds v5 Low Priority Virtual Machines Compute NA Consumption 0.212000 \n", - "westeurope Virtual Machines FS Series Windows F16s Spot Virtual Machines Compute NA Consumption 0.571308 \n", - "westindia Virtual Machines DSv2 Series DS4 v2 Spot Virtual Machines Compute NA Consumption 0.090720 \n", - " Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute NA Consumption 0.023600 \n", - " Virtual Machines Edsv4 Series Windows E48ds v4 Low Priority Virtual Machines Compute NA Consumption 2.551000 \n", - "westus Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute NA Consumption 0.075600 \n", - "westus2 Virtual Machines Ddsv4 Series D64ds v4 Low Priority Virtual Machines Compute NA Consumption 0.723000 \n", - " Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute NA Consumption 3.616000 \n", - " Virtual Machines ESv3 Series Windows E48s v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 \n", - " Virtual Machines Ev3 Series Windows E48 v3 Low Priority Virtual Machines Compute NA Consumption 2.093000 " + " minPrice \n", + "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", + " SQL Server Web Red Hat Enterprise Linux 7 vCPU VM Virtual Machines Licenses Compute NA Consumption 0.186000 \n", + "australiaeast Virtual Machines Esv4 Series Windows E64-16s v4 Spot Virtual Machines Compute NA Consumption 2.057530 \n", + "australiasoutheast Virtual Machines Eadsv5 Series Windows E16-8ads v5 Spot Virtual Machines Compute NA Consumption 0.537088 \n", + " Virtual Machines F Series Windows F16 Spot Virtual Machines Compute NA Consumption 0.403024 \n", + "brazilsouth Virtual Machines A Series Basic A2 Virtual Machines Compute NA Consumption 0.112000 \n", + "... ... \n", + "westindia Virtual Machines Dv4 Series D2 v4 Low Priority Virtual Machines Compute NA Consumption 0.023600 \n", + "westus Premium ADLS Gen2 Hierarchical Namespace Premium ZRS Storage Storage NA Consumption 0.113000 \n", + " Virtual Machines Ebdsv5 Series Standard_E2bds_v5 Spot Virtual Machines Compute NA Consumption 0.075600 \n", + "westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines Compute NA Consumption 3.616000 \n", + "westus3 Azure Redis Cache Enterprise Flash F1500 Redis Cache Databases NA Consumption 10.430000 \n", + "\n", + "[67 rows x 2 columns]" ] }, - "execution_count": 57, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -3122,7 +1768,6 @@ }, { "cell_type": "markdown", - "id": "9cdeb7d1", "metadata": {}, "source": [ "#### Data analysis to understand service prices for type Reservation" @@ -3130,12 +1775,11 @@ }, { "cell_type": "code", - "execution_count": 58, - "id": "793a4b99", + "execution_count": 13, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:13:23.371779Z", - "start_time": "2022-03-29T14:13:23.269772Z" + "end_time": "2022-03-30T14:21:19.484511Z", + "start_time": "2022-03-30T14:21:19.325994Z" } }, "outputs": [ @@ -3185,7 +1829,7 @@ " \n", " \n", " \n", - " 22\n", + " 36\n", " USD\n", " 0.0\n", " 18689.0\n", @@ -3209,7 +1853,7 @@ " 1 Year\n", " \n", " \n", - " 24\n", + " 37\n", " USD\n", " 0.0\n", " 36111.0\n", @@ -3233,11 +1877,11 @@ " 3 Years\n", " \n", " \n", - " 28\n", + " 43\n", " USD\n", " 0.0\n", - " 77890.0\n", - " 77890.0\n", + " 39231.0\n", + " 39231.0\n", " koreasouth\n", " KR South\n", " 2021-12-01T00:00:00Z\n", @@ -3254,14 +1898,14 @@ " Reservation\n", " True\n", " Easv4_Type2\n", - " 3 Years\n", + " 1 Year\n", " \n", " \n", - " 29\n", + " 45\n", " USD\n", " 0.0\n", - " 39231.0\n", - " 39231.0\n", + " 77890.0\n", + " 77890.0\n", " koreasouth\n", " KR South\n", " 2021-12-01T00:00:00Z\n", @@ -3278,14 +1922,14 @@ " Reservation\n", " True\n", " Easv4_Type2\n", - " 1 Year\n", + " 3 Years\n", " \n", " \n", - " 46\n", + " 82\n", " USD\n", " 0.0\n", - " 20012.0\n", - " 20012.0\n", + " 38667.0\n", + " 38667.0\n", " usgovarizona\n", " US Gov AZ\n", " 2020-08-01T00:00:00Z\n", @@ -3302,14 +1946,14 @@ " Reservation\n", " True\n", " Standard_D64s_v4\n", - " 1 Year\n", + " 3 Years\n", " \n", " \n", - " 48\n", + " 83\n", " USD\n", " 0.0\n", - " 38667.0\n", - " 38667.0\n", + " 20012.0\n", + " 20012.0\n", " usgovarizona\n", " US Gov AZ\n", " 2020-08-01T00:00:00Z\n", @@ -3326,10 +1970,10 @@ " Reservation\n", " True\n", " Standard_D64s_v4\n", - " 3 Years\n", + " 1 Year\n", " \n", " \n", - " 56\n", + " 92\n", " USD\n", " 0.0\n", " 48318.0\n", @@ -3353,7 +1997,7 @@ " 3 Years\n", " \n", " \n", - " 57\n", + " 93\n", " USD\n", " 0.0\n", " 25007.0\n", @@ -3376,136 +2020,76 @@ " Standard_E64_v4\n", " 1 Year\n", " \n", - " \n", - " 75\n", - " USD\n", - " 0.0\n", - " 34980.0\n", - " 34980.0\n", - " northeurope\n", - " EU North\n", - " 2021-11-01T00:00:00Z\n", - " NA\n", - " 001a6f90-bc8f-572e-b7bc-f95af3413781\n", - " E96 v5\n", - " ...\n", - " Virtual Machines Ev5 Series\n", - " Standard_E96_v5\n", - " Virtual Machines\n", - " DZH313Z7MMC8\n", - " Compute\n", - " 1 Hour\n", - " Reservation\n", - " True\n", - " Standard_E96_v5\n", - " 1 Year\n", - " \n", - " \n", - " 76\n", - " USD\n", - " 0.0\n", - " 67588.0\n", - " 67588.0\n", - " northeurope\n", - " EU North\n", - " 2021-11-01T00:00:00Z\n", - " NA\n", - " 001a6f90-bc8f-572e-b7bc-f95af3413781\n", - " E96 v5\n", - " ...\n", - " Virtual Machines Ev5 Series\n", - " Standard_E96_v5\n", - " Virtual Machines\n", - " DZH313Z7MMC8\n", - " Compute\n", - " 1 Hour\n", - " Reservation\n", - " True\n", - " Standard_E96_v5\n", - " 3 Years\n", - " \n", " \n", "\n", - "

10 rows × 22 columns

\n", + "

8 rows × 22 columns

\n", "" ], "text/plain": [ " currencyCode tierMinimumUnits retailPrice unitPrice armRegionName \\\n", - "22 USD 0.0 18689.0 18689.0 westus2 \n", - "24 USD 0.0 36111.0 36111.0 westus2 \n", - "28 USD 0.0 77890.0 77890.0 koreasouth \n", - "29 USD 0.0 39231.0 39231.0 koreasouth \n", - "46 USD 0.0 20012.0 20012.0 usgovarizona \n", - "48 USD 0.0 38667.0 38667.0 usgovarizona \n", - "56 USD 0.0 48318.0 48318.0 southcentralus \n", - "57 USD 0.0 25007.0 25007.0 southcentralus \n", - "75 USD 0.0 34980.0 34980.0 northeurope \n", - "76 USD 0.0 67588.0 67588.0 northeurope \n", + "36 USD 0.0 18689.0 18689.0 westus2 \n", + "37 USD 0.0 36111.0 36111.0 westus2 \n", + "43 USD 0.0 39231.0 39231.0 koreasouth \n", + "45 USD 0.0 77890.0 77890.0 koreasouth \n", + "82 USD 0.0 38667.0 38667.0 usgovarizona \n", + "83 USD 0.0 20012.0 20012.0 usgovarizona \n", + "92 USD 0.0 48318.0 48318.0 southcentralus \n", + "93 USD 0.0 25007.0 25007.0 southcentralus \n", "\n", " location effectiveStartDate effectiveEndDate \\\n", - "22 US West 2 2021-11-01T00:00:00Z NA \n", - "24 US West 2 2021-11-01T00:00:00Z NA \n", - "28 KR South 2021-12-01T00:00:00Z NA \n", - "29 KR South 2021-12-01T00:00:00Z NA \n", - "46 US Gov AZ 2020-08-01T00:00:00Z NA \n", - "48 US Gov AZ 2020-08-01T00:00:00Z NA \n", - "56 US South Central 2020-08-01T00:00:00Z NA \n", - "57 US South Central 2020-08-01T00:00:00Z NA \n", - "75 EU North 2021-11-01T00:00:00Z NA \n", - "76 EU North 2021-11-01T00:00:00Z NA \n", + "36 US West 2 2021-11-01T00:00:00Z NA \n", + "37 US West 2 2021-11-01T00:00:00Z NA \n", + "43 KR South 2021-12-01T00:00:00Z NA \n", + "45 KR South 2021-12-01T00:00:00Z NA \n", + "82 US Gov AZ 2020-08-01T00:00:00Z NA \n", + "83 US Gov AZ 2020-08-01T00:00:00Z NA \n", + "92 US South Central 2020-08-01T00:00:00Z NA \n", + "93 US South Central 2020-08-01T00:00:00Z NA \n", "\n", " meterId meterName ... \\\n", - "22 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", - "24 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", - "28 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", - "29 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", - "46 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", - "48 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", - "56 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", - "57 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", - "75 001a6f90-bc8f-572e-b7bc-f95af3413781 E96 v5 ... \n", - "76 001a6f90-bc8f-572e-b7bc-f95af3413781 E96 v5 ... \n", + "36 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", + "37 000aeefc-dae5-5264-8f64-d0838e160478 D64ds v5 ... \n", + "43 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", + "45 000c0948-0687-52ed-8efa-32a3cfa6c9ed Easv4 Type2 ... \n", + "82 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", + "83 0014a546-6717-582f-9680-e510e91eae91 D64s v4 ... \n", + "92 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", + "93 0016083a-928f-56fd-8eeb-39287dcf676d E64 v4 ... \n", "\n", " productName skuName serviceName \\\n", - "22 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines \n", - "24 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines \n", - "28 Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines \n", - "29 Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines \n", - "46 Virtual Machines Dsv4 Series D64s v4 Virtual Machines \n", - "48 Virtual Machines Dsv4 Series D64s v4 Virtual Machines \n", - "56 Virtual Machines Ev4 Series E64 v4 Virtual Machines \n", - "57 Virtual Machines Ev4 Series E64 v4 Virtual Machines \n", - "75 Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines \n", - "76 Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines \n", + "36 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines \n", + "37 Virtual Machines Ddsv5 Series Standard_D64ds_v5 Virtual Machines \n", + "43 Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines \n", + "45 Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines \n", + "82 Virtual Machines Dsv4 Series D64s v4 Virtual Machines \n", + "83 Virtual Machines Dsv4 Series D64s v4 Virtual Machines \n", + "92 Virtual Machines Ev4 Series E64 v4 Virtual Machines \n", + "93 Virtual Machines Ev4 Series E64 v4 Virtual Machines \n", "\n", " serviceId serviceFamily unitOfMeasure type \\\n", - "22 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "24 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "28 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "29 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "46 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "48 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "56 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "57 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "75 DZH313Z7MMC8 Compute 1 Hour Reservation \n", - "76 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "36 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "37 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "43 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "45 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "82 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "83 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "92 DZH313Z7MMC8 Compute 1 Hour Reservation \n", + "93 DZH313Z7MMC8 Compute 1 Hour Reservation \n", "\n", " isPrimaryMeterRegion armSkuName reservationTerm \n", - "22 True Standard_D64ds_v5 1 Year \n", - "24 True Standard_D64ds_v5 3 Years \n", - "28 True Easv4_Type2 3 Years \n", - "29 True Easv4_Type2 1 Year \n", - "46 True Standard_D64s_v4 1 Year \n", - "48 True Standard_D64s_v4 3 Years \n", - "56 True Standard_E64_v4 3 Years \n", - "57 True Standard_E64_v4 1 Year \n", - "75 True Standard_E96_v5 1 Year \n", - "76 True Standard_E96_v5 3 Years \n", + "36 True Standard_D64ds_v5 1 Year \n", + "37 True Standard_D64ds_v5 3 Years \n", + "43 True Easv4_Type2 1 Year \n", + "45 True Easv4_Type2 3 Years \n", + "82 True Standard_D64s_v4 3 Years \n", + "83 True Standard_D64s_v4 1 Year \n", + "92 True Standard_E64_v4 3 Years \n", + "93 True Standard_E64_v4 1 Year \n", "\n", - "[10 rows x 22 columns]" + "[8 rows x 22 columns]" ] }, - "execution_count": 58, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -3517,12 +2101,11 @@ }, { "cell_type": "code", - "execution_count": 59, - "id": "291edfd6", + "execution_count": 14, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:13:28.301798Z", - "start_time": "2022-03-29T14:13:28.241674Z" + "end_time": "2022-03-30T14:21:19.602264Z", + "start_time": "2022-03-30T14:21:19.492848Z" } }, "outputs": [ @@ -3560,7 +2143,7 @@ " \n", " \n", " \n", - " 22\n", + " 36\n", " westus2\n", " Virtual Machines Ddsv5 Series\n", " Standard_D64ds_v5\n", @@ -3572,7 +2155,7 @@ " Reservation\n", " \n", " \n", - " 24\n", + " 37\n", " westus2\n", " Virtual Machines Ddsv5 Series\n", " Standard_D64ds_v5\n", @@ -3584,55 +2167,55 @@ " Reservation\n", " \n", " \n", - " 28\n", + " 43\n", " koreasouth\n", " Easv4 Series Dedicated Host\n", " Easv4 Type2\n", - " 77890.0\n", + " 39231.0\n", " USD\n", " Virtual Machines\n", " Compute\n", - " 3 Years\n", + " 1 Year\n", " Reservation\n", " \n", " \n", - " 29\n", + " 45\n", " koreasouth\n", " Easv4 Series Dedicated Host\n", " Easv4 Type2\n", - " 39231.0\n", + " 77890.0\n", " USD\n", " Virtual Machines\n", " Compute\n", - " 1 Year\n", + " 3 Years\n", " Reservation\n", " \n", " \n", - " 46\n", + " 82\n", " usgovarizona\n", " Virtual Machines Dsv4 Series\n", " D64s v4\n", - " 20012.0\n", + " 38667.0\n", " USD\n", " Virtual Machines\n", " Compute\n", - " 1 Year\n", + " 3 Years\n", " Reservation\n", " \n", " \n", - " 48\n", + " 83\n", " usgovarizona\n", " Virtual Machines Dsv4 Series\n", " D64s v4\n", - " 38667.0\n", + " 20012.0\n", " USD\n", " Virtual Machines\n", " Compute\n", - " 3 Years\n", + " 1 Year\n", " Reservation\n", " \n", " \n", - " 56\n", + " 92\n", " southcentralus\n", " Virtual Machines Ev4 Series\n", " E64 v4\n", @@ -3644,7 +2227,7 @@ " Reservation\n", " \n", " \n", - " 57\n", + " 93\n", " southcentralus\n", " Virtual Machines Ev4 Series\n", " E64 v4\n", @@ -3655,73 +2238,43 @@ " 1 Year\n", " Reservation\n", " \n", - " \n", - " 75\n", - " northeurope\n", - " Virtual Machines Ev5 Series\n", - " Standard_E96_v5\n", - " 34980.0\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", - " 1 Year\n", - " Reservation\n", - " \n", - " \n", - " 76\n", - " northeurope\n", - " Virtual Machines Ev5 Series\n", - " Standard_E96_v5\n", - " 67588.0\n", - " USD\n", - " Virtual Machines\n", - " Compute\n", - " 3 Years\n", - " Reservation\n", - " \n", " \n", "\n", "" ], "text/plain": [ " armRegionName productName skuName \\\n", - "22 westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", - "24 westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", - "28 koreasouth Easv4 Series Dedicated Host Easv4 Type2 \n", - "29 koreasouth Easv4 Series Dedicated Host Easv4 Type2 \n", - "46 usgovarizona Virtual Machines Dsv4 Series D64s v4 \n", - "48 usgovarizona Virtual Machines Dsv4 Series D64s v4 \n", - "56 southcentralus Virtual Machines Ev4 Series E64 v4 \n", - "57 southcentralus Virtual Machines Ev4 Series E64 v4 \n", - "75 northeurope Virtual Machines Ev5 Series Standard_E96_v5 \n", - "76 northeurope Virtual Machines Ev5 Series Standard_E96_v5 \n", + "36 westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", + "37 westus2 Virtual Machines Ddsv5 Series Standard_D64ds_v5 \n", + "43 koreasouth Easv4 Series Dedicated Host Easv4 Type2 \n", + "45 koreasouth Easv4 Series Dedicated Host Easv4 Type2 \n", + "82 usgovarizona Virtual Machines Dsv4 Series D64s v4 \n", + "83 usgovarizona Virtual Machines Dsv4 Series D64s v4 \n", + "92 southcentralus Virtual Machines Ev4 Series E64 v4 \n", + "93 southcentralus Virtual Machines Ev4 Series E64 v4 \n", "\n", " retailPrice currencyCode serviceName serviceFamily reservationTerm \\\n", - "22 18689.0 USD Virtual Machines Compute 1 Year \n", - "24 36111.0 USD Virtual Machines Compute 3 Years \n", - "28 77890.0 USD Virtual Machines Compute 3 Years \n", - "29 39231.0 USD Virtual Machines Compute 1 Year \n", - "46 20012.0 USD Virtual Machines Compute 1 Year \n", - "48 38667.0 USD Virtual Machines Compute 3 Years \n", - "56 48318.0 USD Virtual Machines Compute 3 Years \n", - "57 25007.0 USD Virtual Machines Compute 1 Year \n", - "75 34980.0 USD Virtual Machines Compute 1 Year \n", - "76 67588.0 USD Virtual Machines Compute 3 Years \n", + "36 18689.0 USD Virtual Machines Compute 1 Year \n", + "37 36111.0 USD Virtual Machines Compute 3 Years \n", + "43 39231.0 USD Virtual Machines Compute 1 Year \n", + "45 77890.0 USD Virtual Machines Compute 3 Years \n", + "82 38667.0 USD Virtual Machines Compute 3 Years \n", + "83 20012.0 USD Virtual Machines Compute 1 Year \n", + "92 48318.0 USD Virtual Machines Compute 3 Years \n", + "93 25007.0 USD Virtual Machines Compute 1 Year \n", "\n", " type \n", - "22 Reservation \n", - "24 Reservation \n", - "28 Reservation \n", - "29 Reservation \n", - "46 Reservation \n", - "48 Reservation \n", - "56 Reservation \n", - "57 Reservation \n", - "75 Reservation \n", - "76 Reservation " + "36 Reservation \n", + "37 Reservation \n", + "43 Reservation \n", + "45 Reservation \n", + "82 Reservation \n", + "83 Reservation \n", + "92 Reservation \n", + "93 Reservation " ] }, - "execution_count": 59, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -3745,12 +2298,11 @@ }, { "cell_type": "code", - "execution_count": 60, - "id": "690c58b2", + "execution_count": 16, "metadata": { "ExecuteTime": { - "end_time": "2022-03-29T14:13:35.959811Z", - "start_time": "2022-03-29T14:13:35.881394Z" + "end_time": "2022-03-30T14:21:24.227201Z", + "start_time": "2022-03-30T14:21:23.563953Z" }, "scrolled": true }, @@ -3816,23 +2368,6 @@ " 77890.0\n", " \n", " \n", - " northeurope\n", - " Virtual Machines Ev5 Series\n", - " Standard_E96_v5\n", - " Virtual Machines\n", - " Compute\n", - " 1 Year\n", - " Reservation\n", - " 34980.0\n", - " 34980.0\n", - " \n", - " \n", - " 3 Years\n", - " Reservation\n", - " 67588.0\n", - " 67588.0\n", - " \n", - " \n", " southcentralus\n", " Virtual Machines Ev4 Series\n", " E64 v4\n", @@ -3892,8 +2427,6 @@ "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 1 Year Reservation 39231.0 \n", " 3 Years Reservation 77890.0 \n", - "northeurope Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 1 Year Reservation 34980.0 \n", - " 3 Years Reservation 67588.0 \n", "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 1 Year Reservation 25007.0 \n", " 3 Years Reservation 48318.0 \n", "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 1 Year Reservation 20012.0 \n", @@ -3905,8 +2438,6 @@ "armRegionName productName skuName serviceName serviceFamily reservationTerm type \n", "koreasouth Easv4 Series Dedicated Host Easv4 Type2 Virtual Machines Compute 1 Year Reservation 39231.0 \n", " 3 Years Reservation 77890.0 \n", - "northeurope Virtual Machines Ev5 Series Standard_E96_v5 Virtual Machines Compute 1 Year Reservation 34980.0 \n", - " 3 Years Reservation 67588.0 \n", "southcentralus Virtual Machines Ev4 Series E64 v4 Virtual Machines Compute 1 Year Reservation 25007.0 \n", " 3 Years Reservation 48318.0 \n", "usgovarizona Virtual Machines Dsv4 Series D64s v4 Virtual Machines Compute 1 Year Reservation 20012.0 \n", @@ -3915,7 +2446,7 @@ " 3 Years Reservation 36111.0 " ] }, - "execution_count": 60, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -3937,7 +2468,6 @@ }, { "cell_type": "markdown", - "id": "8386e683", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T13:38:17.721934Z", @@ -3947,7 +2477,6 @@ "source": [ "#### Conclusion - \n", "For the type Consumption In most of the cases across regions, there is slight variation between min and max price\n", - "\n", "For the type Reservation prices are fixed. Max min price analysis is not required." ] } From ad51a563e770f16de4e73b74fac64d068b888ad5 Mon Sep 17 00:00:00 2001 From: Sumedh Patil Date: Mon, 11 Apr 2022 13:46:25 +0530 Subject: [PATCH 6/6] executed pre-commit locally --- .../cloud_price_analysis_azure.ipynb | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/notebooks/experimental/cloud_price_analysis_azure.ipynb b/notebooks/experimental/cloud_price_analysis_azure.ipynb index ee1371c..eecb291 100644 --- a/notebooks/experimental/cloud_price_analysis_azure.ipynb +++ b/notebooks/experimental/cloud_price_analysis_azure.ipynb @@ -2,6 +2,7 @@ "cells": [ { "cell_type": "markdown", + "id": "2c9f7b05", "metadata": {}, "source": [ "### Analysis of Azure Pricing details \n", @@ -13,6 +14,7 @@ { "cell_type": "code", "execution_count": 1, + "id": "2c2a399d", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:13.594615Z", @@ -27,6 +29,7 @@ }, { "cell_type": "markdown", + "id": "0dbffa43", "metadata": {}, "source": [ "#### Access the API end point for Vitual Machine and store JSON file at location ../data/raw/" @@ -35,6 +38,7 @@ { "cell_type": "code", "execution_count": 2, + "id": "414964d3", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:14.454430Z", @@ -43,8 +47,8 @@ }, "outputs": [], "source": [ - "params = {\"filter\" : \"serviceName eq Virtual Machines\"}\n", - "r = requests.get(\"https://prices.azure.com/api/retail/prices\", params = params)\n", + "params = {\"filter\": \"serviceName eq Virtual Machines\"}\n", + "r = requests.get(\"https://prices.azure.com/api/retail/prices\", params=params)\n", "with open(\"../../data/raw/azure_vm.json\", \"w\") as fd:\n", " fd.write(r.text)" ] @@ -52,6 +56,7 @@ { "cell_type": "code", "execution_count": 3, + "id": "c5afe6ed", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:14.650696Z", @@ -173,6 +178,7 @@ }, { "cell_type": "markdown", + "id": "0a904b57", "metadata": {}, "source": [ "#### Understand shape of data" @@ -181,6 +187,7 @@ { "cell_type": "code", "execution_count": 4, + "id": "dc78fb08", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:14.808222Z", @@ -310,6 +317,7 @@ }, { "cell_type": "markdown", + "id": "247a537d", "metadata": { "ExecuteTime": { "end_time": "2022-03-22T05:57:27.176179Z", @@ -323,6 +331,7 @@ { "cell_type": "code", "execution_count": 5, + "id": "aa0c94f6", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:16.185057Z", @@ -360,6 +369,7 @@ }, { "cell_type": "markdown", + "id": "68801327", "metadata": {}, "source": [ "#### Some times JSON file is missing reservationTerm or sometimes carry the values are 1 Year, 3 Years or onDemand\n", @@ -369,6 +379,7 @@ { "cell_type": "code", "execution_count": 6, + "id": "565627e5", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:18.103506Z", @@ -392,6 +403,7 @@ { "cell_type": "code", "execution_count": 7, + "id": "2c313b91", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:18.320177Z", @@ -820,6 +832,7 @@ }, { "cell_type": "markdown", + "id": "1394fe3d", "metadata": {}, "source": [ "#### Understand unique type, Typical values are Consumption and Reservation" @@ -828,6 +841,7 @@ { "cell_type": "code", "execution_count": 8, + "id": "b77fef63", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:18.338384Z", @@ -850,6 +864,7 @@ { "cell_type": "code", "execution_count": 9, + "id": "85847f91", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:18.606000Z", @@ -872,6 +887,7 @@ { "cell_type": "code", "execution_count": 10, + "id": "59a84957", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:18.941626Z", @@ -1288,6 +1304,7 @@ { "cell_type": "code", "execution_count": 11, + "id": "b88a4d4a", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:19.111848Z", @@ -1532,6 +1549,7 @@ }, { "cell_type": "markdown", + "id": "ff60a690", "metadata": {}, "source": [ "#### Group by few columns to get region wise Max Price and Min Price" @@ -1540,6 +1558,7 @@ { "cell_type": "code", "execution_count": 12, + "id": "3e8510f9", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:19.321020Z", @@ -1768,6 +1787,7 @@ }, { "cell_type": "markdown", + "id": "2a59fc3f", "metadata": {}, "source": [ "#### Data analysis to understand service prices for type Reservation" @@ -1776,6 +1796,7 @@ { "cell_type": "code", "execution_count": 13, + "id": "addfcc59", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:19.484511Z", @@ -2102,6 +2123,7 @@ { "cell_type": "code", "execution_count": 14, + "id": "f0e7b612", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:19.602264Z", @@ -2299,6 +2321,7 @@ { "cell_type": "code", "execution_count": 16, + "id": "c1811bff", "metadata": { "ExecuteTime": { "end_time": "2022-03-30T14:21:24.227201Z", @@ -2468,6 +2491,7 @@ }, { "cell_type": "markdown", + "id": "058b5701", "metadata": { "ExecuteTime": { "end_time": "2022-03-29T13:38:17.721934Z", @@ -2483,7 +2507,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -2497,7 +2521,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.10.2" }, "toc": { "base_numbering": 1,