End to End Project - Bikes Assessment?

Hi,
Who can help me to check my following codes? thanks:

"Task: Complete the statements for calculating each of the above derived attributes:

bikesData[‘isWorking’] = bikesData.where(bikesData([“workingday”==1] & bikesData[“holiday”!=1]), 0, 1)

bikesData[‘monthCount’] = mnth_cnt(bikesData)

bikesData[‘xformHr’] = bikesData.where(bikesData[“hr” > 5], bikesData[“hr”]-5, bikesData[“hr”]+19)

bikesData[‘dayCount’] = Date[2] - bikesData[“dteday”][2]

bikesData[‘xformWorkHr’] = bikesData[‘isWorking’]*24 + bikesData[‘xformHr’]

bikesData = set_day(bikesData)

bikesData[‘cntDeTrended’] = bikesData.cnt - ??? "

Moreover, what is De-trended count values?

Regards,
Bintao Li

bikesData[‘dayCount’] = Date[2] - bikesData[“dteday”][2] is wrong I guess.

Data is spreaded in hourly basis. so by simple calculation, row number /24 will give the day count

DeTrend is the difference between actual count and predicted count

Predict using linear regression