'Having coding line graphs after iloc command line

I'm trying to graph a line with the x- axis being the hour to the sum of 24 hours and the y axis being the sums of the first 4 .15 min increments of kWh values.

df= pd.read_excel('IntGenbyFuel2021Jun.xlsx')
df2 = df.loc[(df['Fuel'] == 'Wind') & (df['Date'] >= '06/30/2021') & (df['Date'] <= '06/30/2021')]
df3 = df2['Total_kWh'] = df.iloc[:,5:8].sum(axis=1)
print(df2)
 Date  Fuel Settlement Type          Total         0:15         0:30  \
269 2021-06-30  Wind           FINAL  101775.847995  1562.483635  1594.274073   

            0:45         1:00         1:15         1:30  ...       22:00  \
269  1619.003499  1659.571838  1683.067698  1696.083572  ...  1161.50906   

           22:15       22:30        22:45        23:00        23:15  \
269  1278.830117  1355.94132  1439.850424  1493.850538  1532.737408   

           23:30        23:45         0:00   Total_kWh  
269  1613.013632  1684.620809  1754.104062  4872.84941  

Line 3 is sum all columns but I'm looking the sum just the first 4 and repeat until time reaches 0:00. Column :15 to 1:00 to find the hour. This number is under Total_kWh under the print command. So I would have 24 points on the x axis which describes 24 hrs in a day. The Y -axis being the sum of those columns.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source