SolarArbiter / solarforecastarbiter-api

HTTP API and database schema for the Solar Forecast Arbiter
https://api.solarforecastarbiter.org
MIT License
10 stars 6 forks source link

Convert None to NaN in timeseries before calling compute_aggregate #297

Closed lboeman closed 3 years ago

lboeman commented 3 years ago

closes #296 Converts None values to NaNs to avoid pandas resampling choking with "No numeric types to aggregate" error in core. I've done this here because the core api module handles this conversion for users, so I think this is something the api should take care of. This could also be handled at the storage interface level if there's any concern the issue might crop up elsewhere.

alorenzo175 commented 3 years ago

Yeah, I think this should be handled at the storage interface level, along with forecast values and observation values. I think the best way to go about it might be to set the dtype=float when constructing the dataframes