Description
Issue overview
When loading AnnualRunMeter.csv into a pandas dataframe for post-processing energy modeling results, I tried to index a column titled Electricity:HVAC J
meter_df["Electricity:Facility [kWh](Hourly)"] = meter_df["Electricity:Facility [J](Hourly)"]*2.77778e-7
meter_df["Electricity:Building [kWh](Hourly)"] = meter_df["Electricity:Building [J](Hourly)"]*2.77778e-7
meter_df["Electricity:Plant [kWh](Hourly)"] = meter_df["Electricity:Plant [J](Hourly)"]*2.77778e-7
meter_df["Electricity:HVAC [kWh](Hourly)"] = meter_df["Electricity:HVAC [J](Hourly)"]*2.77778e-7
The following KeyError was thrown.
KeyError: 'Electricity:HVAC [J](Hourly)'
Printing out column titles by executing meter_df.columns revealed that the issue is caused by a typo in the dataframe column header specifically for Electricity:HVAC [J] (Hourly). There is an erroneous extra space after the parentheses closing "Hourly" and the end of the string. This seems to be a problem with E+ output reporting code because I did not modify the meter.csv at all before loading it into the pandas dataframe, and the error occurs for multiple separate E+ runs. I don't know if this error is occurring for the last meter variable in the meter.csv file, or specifically for the Electricity:HVAC variable.
Workarounds for users are manually changing the title of the meter column in the csv or other post-processing tool.
Validate that a fix is complete by opening meter.csv and confirming the typo no longer appears.
Details
Operating System: 64-bit operating system, x64-based processor
EnergyPlus v23.2.0