Skip to content

Commit

Permalink
change column to strings
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Oct 23, 2024
1 parent 518e10b commit 529b223
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion india_forecast_app/models/pvnet/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ def _prepare_data_sources(self):

# if generation_da is still empty make nans
if len(generation_da) == 0:
cols = [str(col) for col in generation_da.columns]
generation_df = pd.DataFrame(
index=forecast_timesteps, columns=generation_da.columns, data=0.0001
index=forecast_timesteps, columns=cols, data=0.0001
)
generation_da = generation_df.to_xarray()
generation_da.to_netcdf(wind_netcdf_path, engine="h5netcdf")
Expand Down

0 comments on commit 529b223

Please sign in to comment.