I have a data frame temps that looks like this
And I am trying to apply a shift of 1 and then a rolling function with window 2 and finally taking the mean of the rolling data frame, see below code for reference,
shifted = temps.shift(1)
window = shifted.rolling(2)
means = window.mean()
but I am getting an error like below:
DataError: No numeric types to aggregate
when I print the window, I get an output like below":
Can someone please tell me why I am receiving a DataError on calculating mean() of rolling output? and is the rolling function used correctly here?