{ "cells": [ { "cell_type": "markdown", "id": "58122d337dd29131", "metadata": {}, "source": [ "# Hub Price Pull Example" ] }, { "cell_type": "markdown", "id": "45ef27cd-e2a9-4639-8dea-1023bd25c520", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": 1, "id": "bcf043f0-7d91-4216-8615-c5ee7f41dc68", "metadata": { "tags": [] }, "outputs": [], "source": [ "import time\n", "import os\n", "import pandas as pd\n", "from tyba_client.client import Client, Market\n", "\n", "PAT = os.environ[\"TYBA_PAT\"]\n", "client = Client(PAT)\n", "\n", "# Relevant API services\n", "services = client.services\n", "lmp = services.lmp\n", "ancillary = services.ancillary" ] }, { "cell_type": "markdown", "id": "b1274321-d99d-460c-865f-a5977937899f", "metadata": {}, "source": [ "## User inputs" ] }, { "cell_type": "code", "execution_count": 2, "id": "69c2c0c6-aa00-482f-9e74-e001b6273eb3", "metadata": {}, "outputs": [], "source": [ "iso = 'CAISO'\n", "start_year = 2024\n", "end_year = 2024" ] }, { "cell_type": "markdown", "id": "80a06069-d855-4f6c-862b-c731f4d6172d", "metadata": {}, "source": [ "## Energy Pull - define ISO/RTO" ] }, { "cell_type": "code", "execution_count": 3, "id": "3a6fd579-08dd-4c7c-b057-96d4f734091c", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "['PJMISO', 'CAISO', 'NEISO', 'NYISO', 'ERCOT', 'SPPISO', 'MISO']" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "services.get_all_isos().json()" ] }, { "cell_type": "markdown", "id": "e5324e8f-8ecb-4b05-91b6-dbbd97aa60c1", "metadata": {}, "source": [ "## Pull All Nodes for the ISO/RTO" ] }, { "cell_type": "code", "execution_count": 4, "id": "9e94c481-bf16-4f75-b52f-be8d7be31fdd", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " da_end_year rt_end_year rt_start_year name \\\n", "0 2025.0 2025 2023 CLAP_WWRSR1-APND \n", "1 2025.0 2025 2015 ELCENTRO_2_N001:IVLY2 \n", "2 2025.0 2025 2022 KERMAC_LNODEITED \n", "3 2025.0 2025 2021 VIEWLND_LNODE787 \n", "4 2025.0 2025 2010 BUTTE_1_N101 \n", "\n", " id da_start_year zone type substation \n", "0 10017280350 2023.0 SDGE GENERATOR NaN \n", "1 10003899356 2015.0 SPTIE \n", "2 10016667720 2022.0 PNM LOAD \n", "3 10016243530 2021.0 SCL LOAD VIEWLAND-HOFFMAN \n", "4 20000000353 2010.0 PGE LOAD BUTTE \n" ] } ], "source": [ "# Get all nodes for RTO\n", "price_nodes = lmp.get_all_nodes(iso=iso).json()\n", "node_directory = pd.DataFrame(price_nodes)\n", "print(node_directory.head()) # Display the first few rows to check the content" ] }, { "cell_type": "code", "execution_count": 5, "id": "7bb42db2-d5c5-4873-adcc-15908b57e3cb", "metadata": { "tags": [] }, "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", "
da_end_yearrt_end_yearrt_start_yearnameidda_start_yearzonetypesubstation
02025.020252023CLAP_WWRSR1-APND100172803502023.0SDGEGENERATORNaN
12025.020252015ELCENTRO_2_N001:IVLY2100038993562015.0SPTIE
22025.020252022KERMAC_LNODEITED100166677202022.0PNMLOAD
32025.020252021VIEWLND_LNODE787100162435302021.0SCLLOADVIEWLAND-HOFFMAN
42025.020252010BUTTE_1_N101200000003532010.0PGELOADBUTTE
..............................
221782025.020252022HUGHSON_LNODEDR8100166644592022.0TIDCLOADHUGHSON
221792025.020252022COTTONWD_1_COTTONWODLNODE100169300512022.0AVALOADNaN
221802025.020252010SPICAMIN_1_N001200000034372010.0PGELOADSPICAMIN
221812025.020252023FREDONIA_LNODELD100171101232023.0WALCLOADNaN
221822025.020252016VENWIND_1_N104100028982492016.0SCEGENERATOR
\n", "

22183 rows × 9 columns

\n", "
" ], "text/plain": [ " da_end_year rt_end_year rt_start_year name \\\n", "0 2025.0 2025 2023 CLAP_WWRSR1-APND \n", "1 2025.0 2025 2015 ELCENTRO_2_N001:IVLY2 \n", "2 2025.0 2025 2022 KERMAC_LNODEITED \n", "3 2025.0 2025 2021 VIEWLND_LNODE787 \n", "4 2025.0 2025 2010 BUTTE_1_N101 \n", "... ... ... ... ... \n", "22178 2025.0 2025 2022 HUGHSON_LNODEDR8 \n", "22179 2025.0 2025 2022 COTTONWD_1_COTTONWODLNODE \n", "22180 2025.0 2025 2010 SPICAMIN_1_N001 \n", "22181 2025.0 2025 2023 FREDONIA_LNODELD \n", "22182 2025.0 2025 2016 VENWIND_1_N104 \n", "\n", " id da_start_year zone type substation \n", "0 10017280350 2023.0 SDGE GENERATOR NaN \n", "1 10003899356 2015.0 SPTIE \n", "2 10016667720 2022.0 PNM LOAD \n", "3 10016243530 2021.0 SCL LOAD VIEWLAND-HOFFMAN \n", "4 20000000353 2010.0 PGE LOAD BUTTE \n", "... ... ... ... ... ... \n", "22178 10016664459 2022.0 TIDC LOAD HUGHSON \n", "22179 10016930051 2022.0 AVA LOAD NaN \n", "22180 20000003437 2010.0 PGE LOAD SPICAMIN \n", "22181 10017110123 2023.0 WALC LOAD NaN \n", "22182 10002898249 2016.0 SCE GENERATOR \n", "\n", "[22183 rows x 9 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "node_directory" ] }, { "cell_type": "code", "execution_count": 6, "id": "13a347a7-bf39-42af-844b-4a9487abf915", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "array(['GENERATOR', 'SPTIE', 'LOAD', 'N/A', 'INTERTIE', 'AGGREGATE',\n", " 'HUB'], dtype=object)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "node_directory.type.unique()" ] }, { "cell_type": "markdown", "id": "d95028e7-9484-40c9-949c-dbda723563aa", "metadata": {}, "source": [ "## Filter down to zonal LMPs" ] }, { "cell_type": "code", "execution_count": 12, "id": "866fbff9-b500-4b51-8c22-3d1d079db254", "metadata": { "tags": [] }, "outputs": [], "source": [ "multiple_nodes = node_directory[node_directory['type'] == 'HUB']" ] }, { "cell_type": "code", "execution_count": 13, "id": "1e777db6-2b88-4dd7-9006-4c6a840d1d94", "metadata": { "tags": [] }, "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", "
da_end_yearrt_end_yearrt_start_yearnameidda_start_yearzonetypesubstation
16512024.020242022TH_NP15_GEN_OFFPEAK-APND100008027932022.0N/AHUB
23732025.020252010TH_NP15_GEN-APND200000046772010.0N/AHUB
35432024.020242022TH_ZP26_GEN_ONPEAK-APND100008027802022.0N/AHUB
75112024.020242022TH_SP15_GEN_OFFPEAK-APND100008027942022.0N/AHUB
92442025.020252010TH_ZP26_GEN-APND200000046702010.0N/AHUB
154382025.020252010TH_SP15_GEN-APND200000046822010.0N/AHUB
172542024.020242022TH_NP15_GEN_ONPEAK-APND100008027812022.0N/AHUB
177802024.020242022TH_SP15_GEN_ONPEAK-APND100008027792022.0N/AHUB
180852024.020242022TH_ZP26_GEN_OFFPEAK-APND100008027922022.0N/AHUB
\n", "
" ], "text/plain": [ " da_end_year rt_end_year rt_start_year name \\\n", "1651 2024.0 2024 2022 TH_NP15_GEN_OFFPEAK-APND \n", "2373 2025.0 2025 2010 TH_NP15_GEN-APND \n", "3543 2024.0 2024 2022 TH_ZP26_GEN_ONPEAK-APND \n", "7511 2024.0 2024 2022 TH_SP15_GEN_OFFPEAK-APND \n", "9244 2025.0 2025 2010 TH_ZP26_GEN-APND \n", "15438 2025.0 2025 2010 TH_SP15_GEN-APND \n", "17254 2024.0 2024 2022 TH_NP15_GEN_ONPEAK-APND \n", "17780 2024.0 2024 2022 TH_SP15_GEN_ONPEAK-APND \n", "18085 2024.0 2024 2022 TH_ZP26_GEN_OFFPEAK-APND \n", "\n", " id da_start_year zone type substation \n", "1651 10000802793 2022.0 N/A HUB \n", "2373 20000004677 2010.0 N/A HUB \n", "3543 10000802780 2022.0 N/A HUB \n", "7511 10000802794 2022.0 N/A HUB \n", "9244 20000004670 2010.0 N/A HUB \n", "15438 20000004682 2010.0 N/A HUB \n", "17254 10000802781 2022.0 N/A HUB \n", "17780 10000802779 2022.0 N/A HUB \n", "18085 10000802792 2022.0 N/A HUB " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "multiple_nodes" ] }, { "cell_type": "markdown", "id": "74eb21c4-8b96-40ac-9cd7-d7ba19ec4ae5", "metadata": {}, "source": [ "## Filter out nodes with insufficient data range" ] }, { "cell_type": "code", "execution_count": 14, "id": "8d53d17d-a693-4c47-8d3a-bd8aea2d7bf4", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " da_end_year rt_end_year rt_start_year name \\\n", "1651 2024.0 2024 2022 TH_NP15_GEN_OFFPEAK-APND \n", "2373 2025.0 2025 2010 TH_NP15_GEN-APND \n", "3543 2024.0 2024 2022 TH_ZP26_GEN_ONPEAK-APND \n", "7511 2024.0 2024 2022 TH_SP15_GEN_OFFPEAK-APND \n", "9244 2025.0 2025 2010 TH_ZP26_GEN-APND \n", "15438 2025.0 2025 2010 TH_SP15_GEN-APND \n", "17254 2024.0 2024 2022 TH_NP15_GEN_ONPEAK-APND \n", "17780 2024.0 2024 2022 TH_SP15_GEN_ONPEAK-APND \n", "18085 2024.0 2024 2022 TH_ZP26_GEN_OFFPEAK-APND \n", "\n", " id da_start_year zone type substation \n", "1651 10000802793 2022.0 N/A HUB \n", "2373 20000004677 2010.0 N/A HUB \n", "3543 10000802780 2022.0 N/A HUB \n", "7511 10000802794 2022.0 N/A HUB \n", "9244 20000004670 2010.0 N/A HUB \n", "15438 20000004682 2010.0 N/A HUB \n", "17254 10000802781 2022.0 N/A HUB \n", "17780 10000802779 2022.0 N/A HUB \n", "18085 10000802792 2022.0 N/A HUB \n" ] } ], "source": [ "# Filter out nodes with insufficient data range\n", "valid_nodes = multiple_nodes[\n", " (multiple_nodes['rt_start_year'] <= start_year) &\n", " (multiple_nodes['rt_end_year'] >= end_year) &\n", " (multiple_nodes['da_start_year'] <= start_year) &\n", " (multiple_nodes['da_end_year'] >= end_year)\n", "]\n", "print(valid_nodes)" ] }, { "cell_type": "markdown", "id": "75b201cd-80b8-4c80-995b-e063a5cc5d49", "metadata": {}, "source": [ "## Helper Functions" ] }, { "cell_type": "code", "execution_count": 15, "id": "e004820e-5699-413c-bffa-f1e22a5fc3ca", "metadata": { "tags": [] }, "outputs": [], "source": [ "def reformat_df(result):\n", " df = pd.concat(\n", " {node: pd.DataFrame(results['prices'], index=pd.to_datetime(results['datetimes'])) for node, results in result.items()},\n", " axis=1\n", " )\n", " return df.droplevel(axis=1, level=1).tz_localize(None)\n", "\n", "def lmp_pull(directory, start_year, end_year, markets):\n", " import pandas as pd\n", " \n", " nodemap = dict(zip(directory.id, directory.name)) # Converts the nodes DataFrame into a dictionary\n", " market_options = {'RT': Market.RT, 'DA': Market.DA} # Maps market keys to their corresponding Market options\n", " results = {}\n", "\n", " # Split node IDs into batches of 8\n", " node_ids = list(nodemap.keys())\n", " batches = [node_ids[i:i + 8] for i in range(0, len(node_ids), 8)]\n", "\n", " for market in markets:\n", " print(f\"Pulling data for market: {market_options[market]}\")\n", "\n", " # Temporary list to store batch results\n", " batch_results = []\n", "\n", " for batch in batches:\n", " print(f\"Processing batch: {batch}\")\n", " prices = lmp.get_prices(\n", " node_ids=batch, # Pass batch of 8 node IDs\n", " market=market_options[market], # Specify the market\n", " start_year=int(start_year),\n", " end_year=int(end_year),\n", " ).json()\n", "\n", " # Reformat and rename columns with the node names\n", " batch_df = reformat_df(prices).rename(nodemap, axis=1)\n", " batch_results.append(batch_df)\n", "\n", " # Concatenate all batch results for this market\n", " results[market] = pd.concat(batch_results, axis=0)\n", "\n", " # Combine all markets into a single DataFrame with a MultiIndex\n", " return pd.concat(results, axis=1)" ] }, { "cell_type": "markdown", "id": "7a411f1b-f345-4987-a521-edf7bf9c08a2", "metadata": {}, "source": [ "## Pull prices for valid HUBs" ] }, { "cell_type": "code", "execution_count": 16, "id": "36c4d969-6612-4110-807f-e305e7ac4a59", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Pulling data for market: realtime\n", "Processing batch: ['10000802793', '20000004677', '10000802780', '10000802794', '20000004670', '20000004682', '10000802781', '10000802779']\n", "Processing batch: ['10000802792']\n", "Pulling data for market: dayahead\n", "Processing batch: ['10000802793', '20000004677', '10000802780', '10000802794', '20000004670', '20000004682', '10000802781', '10000802779']\n", "Processing batch: ['10000802792']\n" ] } ], "source": [ "lmps = lmp_pull(valid_nodes, start_year, end_year, ['RT', 'DA'])" ] }, { "cell_type": "code", "execution_count": 17, "id": "437df268-d8fe-4f2f-8094-79f423f97b2d", "metadata": { "tags": [] }, "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", "
RTDA
TH_NP15_GEN_OFFPEAK-APNDTH_NP15_GEN-APNDTH_ZP26_GEN_ONPEAK-APNDTH_SP15_GEN_OFFPEAK-APNDTH_ZP26_GEN-APNDTH_SP15_GEN-APNDTH_NP15_GEN_ONPEAK-APNDTH_SP15_GEN_ONPEAK-APNDTH_ZP26_GEN_OFFPEAK-APNDTH_NP15_GEN_OFFPEAK-APNDTH_NP15_GEN-APNDTH_ZP26_GEN_ONPEAK-APNDTH_SP15_GEN_OFFPEAK-APNDTH_ZP26_GEN-APNDTH_SP15_GEN-APNDTH_NP15_GEN_ONPEAK-APNDTH_SP15_GEN_ONPEAK-APNDTH_ZP26_GEN_OFFPEAK-APND
2024-01-01 00:00:0046.078046.07800.044.533344.910644.53330.00.0NaN46.7577446.757740.046.0800045.8428746.080000.00.0NaN
2024-01-01 01:00:0046.422446.42240.044.178744.948644.17870.00.0NaN46.0405246.040520.045.3257145.1670845.325710.00.0NaN
2024-01-01 02:00:0047.337347.33730.045.344745.956545.34470.00.0NaN45.1306245.130620.044.9112944.5108644.911290.00.0NaN
2024-01-01 03:00:0046.961746.96170.044.792745.500544.79270.00.0NaN44.9312144.931210.044.5631444.2249544.563140.00.0NaN
2024-01-01 04:00:0047.128547.12850.044.971145.699244.97110.00.0NaN44.5526044.552600.044.1712643.8178644.171260.00.0NaN
\n", "
" ], "text/plain": [ " RT \\\n", " TH_NP15_GEN_OFFPEAK-APND TH_NP15_GEN-APND \n", "2024-01-01 00:00:00 46.0780 46.0780 \n", "2024-01-01 01:00:00 46.4224 46.4224 \n", "2024-01-01 02:00:00 47.3373 47.3373 \n", "2024-01-01 03:00:00 46.9617 46.9617 \n", "2024-01-01 04:00:00 47.1285 47.1285 \n", "\n", " \\\n", " TH_ZP26_GEN_ONPEAK-APND TH_SP15_GEN_OFFPEAK-APND \n", "2024-01-01 00:00:00 0.0 44.5333 \n", "2024-01-01 01:00:00 0.0 44.1787 \n", "2024-01-01 02:00:00 0.0 45.3447 \n", "2024-01-01 03:00:00 0.0 44.7927 \n", "2024-01-01 04:00:00 0.0 44.9711 \n", "\n", " \\\n", " TH_ZP26_GEN-APND TH_SP15_GEN-APND TH_NP15_GEN_ONPEAK-APND \n", "2024-01-01 00:00:00 44.9106 44.5333 0.0 \n", "2024-01-01 01:00:00 44.9486 44.1787 0.0 \n", "2024-01-01 02:00:00 45.9565 45.3447 0.0 \n", "2024-01-01 03:00:00 45.5005 44.7927 0.0 \n", "2024-01-01 04:00:00 45.6992 44.9711 0.0 \n", "\n", " \\\n", " TH_SP15_GEN_ONPEAK-APND TH_ZP26_GEN_OFFPEAK-APND \n", "2024-01-01 00:00:00 0.0 NaN \n", "2024-01-01 01:00:00 0.0 NaN \n", "2024-01-01 02:00:00 0.0 NaN \n", "2024-01-01 03:00:00 0.0 NaN \n", "2024-01-01 04:00:00 0.0 NaN \n", "\n", " DA \\\n", " TH_NP15_GEN_OFFPEAK-APND TH_NP15_GEN-APND \n", "2024-01-01 00:00:00 46.75774 46.75774 \n", "2024-01-01 01:00:00 46.04052 46.04052 \n", "2024-01-01 02:00:00 45.13062 45.13062 \n", "2024-01-01 03:00:00 44.93121 44.93121 \n", "2024-01-01 04:00:00 44.55260 44.55260 \n", "\n", " \\\n", " TH_ZP26_GEN_ONPEAK-APND TH_SP15_GEN_OFFPEAK-APND \n", "2024-01-01 00:00:00 0.0 46.08000 \n", "2024-01-01 01:00:00 0.0 45.32571 \n", "2024-01-01 02:00:00 0.0 44.91129 \n", "2024-01-01 03:00:00 0.0 44.56314 \n", "2024-01-01 04:00:00 0.0 44.17126 \n", "\n", " \\\n", " TH_ZP26_GEN-APND TH_SP15_GEN-APND TH_NP15_GEN_ONPEAK-APND \n", "2024-01-01 00:00:00 45.84287 46.08000 0.0 \n", "2024-01-01 01:00:00 45.16708 45.32571 0.0 \n", "2024-01-01 02:00:00 44.51086 44.91129 0.0 \n", "2024-01-01 03:00:00 44.22495 44.56314 0.0 \n", "2024-01-01 04:00:00 43.81786 44.17126 0.0 \n", "\n", " \n", " TH_SP15_GEN_ONPEAK-APND TH_ZP26_GEN_OFFPEAK-APND \n", "2024-01-01 00:00:00 0.0 NaN \n", "2024-01-01 01:00:00 0.0 NaN \n", "2024-01-01 02:00:00 0.0 NaN \n", "2024-01-01 03:00:00 0.0 NaN \n", "2024-01-01 04:00:00 0.0 NaN " ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lmps.head()" ] }, { "cell_type": "code", "execution_count": 16, "id": "aa6e1e6e-fb1b-4f67-b8a8-5622cda74f37", "metadata": { "tags": [] }, "outputs": [], "source": [ "lmps.to_csv(f\"Output/{iso}_hub_energyprices_{start_year}_{end_year}.csv\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10.14" } }, "nbformat": 4, "nbformat_minor": 5 }