Analyzing and visualizing the dataset for the ‘Bike Rental Forecasting’ problem

I am referring to question 28, 8th sub-part “Plotting the demand counts for each of the transformed work hours which include working and non-working hours”

I did some try and error and got the answer indicated as right:

labels = ["Boxplots of bike demand at 0900 \n\n", "Boxplots of bike demand at 1800 \n\n"]
times = [8, 17]
# Task: Complete these statements
col =  ['isWorking']
byCol = ['hr']

for lab, tms in zip(labels, times):
    temp = bikesData[bikesData.hr == tms]
    fig = plt.figure(figsize=(8, 6))
    fig.clf()
    ax = fig.gca()
    
    temp.boxplot(column = col, by = byCol, ax = ax)
    plt.xlabel('')
    plt.ylabel('Number of bikes')
    plt.title(lab)
    plt.show()

But I am not sure if this is correct.