ajwdewit / pcse

Repository for the Python Crop Simulation Environment
Other
184 stars 125 forks source link

Manage missing days on NASA Power API calls #40

Closed codename5281 closed 3 years ago

codename5281 commented 3 years ago

Hello and thanks for your work, I wonder if there is a way to manage missing days on NASA Power API calls, What seems the most straightforward is to perform a linear interpolation on the exported dataframe using Pandas such as

df = pd.DataFrame(weather.export()).set_index("DAY")
df=df.asfreq('D').interpolate()

However i don't see how to import back this dataframe as a weather object, and the needed csv format for the csv import helper needs quite a lot of reformatting. Is there an easy workaround for this ? Thanks ! J.

Amarounek commented 3 years ago

https://github.com/ajwdewit/pcse/issues/37

However, notice @ajwdewit comment there ;-)

codename5281 commented 3 years ago

Ah sorry, didn't had the reflex to check on the closed topics section - thanks for your fast reply though !