I’m a beginner so please take it easy.
In my code I was trying to put the data from data table to df table by using below code:
df = pd.DataFrame(columns=['time'] + list(map(str, range(30))))
for i, time in enumerate(sorted(set(data.index.time))):
df.loc[i] = [time.strftime(format='%H:%M:%S')] + list(data.at_time(time)['load'].values)[:31]
Now the data table looks(has data for 30 days similiarly) like :
Now I want the df to be something like this:
Now even though the df and the list(+1 for date) has equal columns, I don’t know why this error.
Help is much needed.
Thanks in advance.