Closed sotorrio1 closed 2 years ago
When running some of the Python examples in the ERCOT.md file, I run into some issues regarding the time index. The original line is:
time_index = pd.DatetimeIndex(f['time-index'][...])
But it generates the following error:
TypeError: <class 'bytes'> is not convertible to datetime
Please find below my suggested workaround:
time_arr = f['time_index'][...].astype('datetime64[ns]') time_index = pd.DatetimeIndex(time_arr)
I first read the 'time_index' key from the h5 file into a Numpy array as 'datetime' type and then create the 'time_index' Pandas time series.
Thanks @sotorrio1 the examples have been updated.
@MRossol Thank you!
When running some of the Python examples in the ERCOT.md file, I run into some issues regarding the time index. The original line is:
But it generates the following error:
Please find below my suggested workaround:
I first read the 'time_index' key from the h5 file into a Numpy array as 'datetime' type and then create the 'time_index' Pandas time series.