@SaeranVasanthakumar, appreciate the response!
I’m loading the local epw file directly into the EPW()…
This code doesn’t get past the “convert_to_ip()” line without throwing the error, so i believe its something to do with the “convert_to_ip”:
#selected_epw_file = '/data/location.epw'
epwfile = EPW(selected_epw_file)
epwfile = epwfile.convert_to_ip()
st.write(epwfile)
db_temps = epwfile.dry_bulb_temperature
st.write(db_temps) #hoping to not convert this to a dataframe, because i eventually want to create a heat map chart with it
TypeError: can’t multiply sequence by non-int of type ‘float’
I was hoping to avoid converting to dataframe because then i’ll loose the heatmap function of the data, and have to add a header and datatype before passing it back to a heat map chart
#selected_epw_file = '/data/location.epw'
epwfile = EPW(selected_epw_file)
db_temps = epwfile.dry_bulb_temperature
db_temps = db_temps.to_ip()
st.write(db_temps)
makeannualchart(db_temps,'RdYlBu',False,'drybulbtemp')
gives the following error in streamlit:
TypeError: can’t multiply sequence by non-int of type ‘float’
Traceback:
File “/home/vscode/.local/lib/python3.7/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 565, in _run_script
exec(code, module.dict)
File “/workspaces/pactapp/EPWMap.py”, line 224, in
db_temps.convert_to_ip()
File “/home/vscode/.local/lib/python3.7/site-packages/ladybug/_datacollectionbase.py”, line 164, in convert_to_ip
self._values, self._header.unit)
File “/home/vscode/.local/lib/python3.7/site-packages/ladybug/datatype/temperature.py”, line 38, in to_ip
return self.to_unit(values, ‘F’, from_unit), ‘F’
File “/home/vscode/.local/lib/python3.7/site-packages/ladybug/datatype/temperature.py”, line 31, in to_unit
return self._to_unit_base(‘C’, values, unit, from_unit)
File “/home/vscode/.local/lib/python3.7/site-packages/ladybug_pandas/extension_types/dtype.py”, line 23, in _to_unit_base_hack
values = eval(statement, namespace)
File “”, line 1, in
File “/home/vscode/.local/lib/python3.7/site-packages/ladybug/datatype/temperature.py”, line 18, in _C_to_F
return value * 9. / 5. + 32.
Am I misunderstanding something from this documentation?