{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd \n", "from datetime import datetime \n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
datezone_017_hw_valvertu_004_sat_sp_tnzone_017_tempzone_017_fan_spdrtu_004_fltrd_sa_flow_tnrtu_004_sa_temprtu_004_pa_static_stpt_tnrtu_004_oa_flow_tnrtu_004_oadmpr_pct...zone_017_heating_sphvac_Shp_hws_temparu_001_cwr_temparu_001_cws_fr_gpmaru_001_cws_temparu_001_hwr_temparu_001_hws_fr_gpmaru_001_hws_temphp_hws_temp
02018-01-01 00:00:00100.069.066.720.09265.60466.10.060.00000028.0...NaNNaN75.3NaNNaNNaNNaNNaNNaN75.3
12018-01-01 00:01:00100.069.066.720.09265.60466.00.066572.09916228.0...NaNNaN75.3NaNNaNNaNNaNNaNNaN75.3
22018-01-01 00:02:00100.069.066.720.09708.24066.10.067628.83254228.0...NaNNaN75.3NaNNaNNaNNaNNaNNaN75.3
32018-01-01 00:03:00100.069.066.720.09611.63866.10.067710.29461728.0...NaNNaN75.3NaNNaNNaNNaNNaNNaN75.3
42018-01-01 00:04:00100.069.066.720.09215.11066.00.067139.18409028.0...NaNNaN75.3NaNNaNNaNNaNNaNNaN75.3
..................................................................
20721492020-12-31 23:58:00100.068.063.540.018884.83464.40.062938.32000023.4...71.023.145000123.856.2554.7156.4123.4261.6122.36123.8
20721502020-12-31 23:58:00100.068.063.540.018884.83464.40.062938.32000023.4...71.023.145000123.856.2554.7156.4123.4261.6122.36123.8
20721512020-12-31 23:59:00100.068.063.540.019345.50864.30.063154.39000023.4...71.023.145000123.856.2554.7156.4123.4261.6122.36123.8
20721522020-12-31 23:59:00100.068.063.540.019345.50864.30.063154.39000023.4...71.023.145000123.856.2554.7156.4123.4261.6122.36123.8
20721532021-01-01 00:00:00100.068.063.540.018650.23264.10.063076.27000022.9...71.023.788947123.856.2554.7156.4123.4261.6122.36123.8
\n", "

2072154 rows × 29 columns

\n", "
" ], "text/plain": [ " date zone_017_hw_valve rtu_004_sat_sp_tn \\\n", "0 2018-01-01 00:00:00 100.0 69.0 \n", "1 2018-01-01 00:01:00 100.0 69.0 \n", "2 2018-01-01 00:02:00 100.0 69.0 \n", "3 2018-01-01 00:03:00 100.0 69.0 \n", "4 2018-01-01 00:04:00 100.0 69.0 \n", "... ... ... ... \n", "2072149 2020-12-31 23:58:00 100.0 68.0 \n", "2072150 2020-12-31 23:58:00 100.0 68.0 \n", "2072151 2020-12-31 23:59:00 100.0 68.0 \n", "2072152 2020-12-31 23:59:00 100.0 68.0 \n", "2072153 2021-01-01 00:00:00 100.0 68.0 \n", "\n", " zone_017_temp zone_017_fan_spd rtu_004_fltrd_sa_flow_tn \\\n", "0 66.7 20.0 9265.604 \n", "1 66.7 20.0 9265.604 \n", "2 66.7 20.0 9708.240 \n", "3 66.7 20.0 9611.638 \n", "4 66.7 20.0 9215.110 \n", "... ... ... ... \n", "2072149 63.5 40.0 18884.834 \n", "2072150 63.5 40.0 18884.834 \n", "2072151 63.5 40.0 19345.508 \n", "2072152 63.5 40.0 19345.508 \n", "2072153 63.5 40.0 18650.232 \n", "\n", " rtu_004_sa_temp rtu_004_pa_static_stpt_tn rtu_004_oa_flow_tn \\\n", "0 66.1 0.06 0.000000 \n", "1 66.0 0.06 6572.099162 \n", "2 66.1 0.06 7628.832542 \n", "3 66.1 0.06 7710.294617 \n", "4 66.0 0.06 7139.184090 \n", "... ... ... ... \n", "2072149 64.4 0.06 2938.320000 \n", "2072150 64.4 0.06 2938.320000 \n", "2072151 64.3 0.06 3154.390000 \n", "2072152 64.3 0.06 3154.390000 \n", "2072153 64.1 0.06 3076.270000 \n", "\n", " rtu_004_oadmpr_pct ... zone_017_heating_sp hvac_S hp_hws_temp \\\n", "0 28.0 ... NaN NaN 75.3 \n", "1 28.0 ... NaN NaN 75.3 \n", "2 28.0 ... NaN NaN 75.3 \n", "3 28.0 ... NaN NaN 75.3 \n", "4 28.0 ... NaN NaN 75.3 \n", "... ... ... ... ... ... \n", "2072149 23.4 ... 71.0 23.145000 123.8 \n", "2072150 23.4 ... 71.0 23.145000 123.8 \n", "2072151 23.4 ... 71.0 23.145000 123.8 \n", "2072152 23.4 ... 71.0 23.145000 123.8 \n", "2072153 22.9 ... 71.0 23.788947 123.8 \n", "\n", " aru_001_cwr_temp aru_001_cws_fr_gpm aru_001_cws_temp \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "... ... ... ... \n", "2072149 56.25 54.71 56.4 \n", "2072150 56.25 54.71 56.4 \n", "2072151 56.25 54.71 56.4 \n", "2072152 56.25 54.71 56.4 \n", "2072153 56.25 54.71 56.4 \n", "\n", " aru_001_hwr_temp aru_001_hws_fr_gpm aru_001_hws_temp hp_hws_temp \n", "0 NaN NaN NaN 75.3 \n", "1 NaN NaN NaN 75.3 \n", "2 NaN NaN NaN 75.3 \n", "3 NaN NaN NaN 75.3 \n", "4 NaN NaN NaN 75.3 \n", "... ... ... ... ... \n", "2072149 123.42 61.6 122.36 123.8 \n", "2072150 123.42 61.6 122.36 123.8 \n", "2072151 123.42 61.6 122.36 123.8 \n", "2072152 123.42 61.6 122.36 123.8 \n", "2072153 123.42 61.6 122.36 123.8 \n", "\n", "[2072154 rows x 29 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "merged = pd.read_csv(r'data/long_merge.csv')\n", "\n", "zone = \"17\"\n", "\n", "if zone in [\"36\", \"37\", \"38\", \"39\", \"40\", \"41\", \"42\", \"64\", \"65\", \"66\", \"67\", \"68\", \"69\", \"70\"]:\n", " rtu = \"rtu_001\"\n", " wing = \"hvac_N\"\n", "elif zone in [\"18\", \"25\", \"26\", \"45\", \"48\", \"55\", \"56\", \"61\"]:\n", " rtu = \"rtu_003\"\n", " wing = \"hvac_S\"\n", "elif zone in [\"16\", \"17\", \"21\", \"22\", \"23\", \"24\", \"46\", \"47\", \"51\", \"52\", \"53\", \"54\"]:\n", " rtu = \"rtu_004\"\n", " wing = \"hvac_S\"\n", "else:\n", " rtu = \"rtu_002\"\n", " wing = \"hvac_N\"\n", "#merged is the dataframe\n", "sorted = merged[[\"date\"]+[col for col in merged.columns if zone in col or rtu in col or wing in col]+[\"hp_hws_temp\", \"aru_001_cwr_temp\" , \"aru_001_cws_fr_gpm\" ,\"aru_001_cws_temp\",\"aru_001_hwr_temp\" ,\"aru_001_hws_fr_gpm\" ,\"aru_001_hws_temp\",\"hp_hws_temp\"]]\n", "sorted" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "base", "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.11.8" } }, "nbformat": 4, "nbformat_minor": 2 }