Probably because date isn't a column in the dataframe.
date
You should provide a reproducible example and some explanation instead of a screenshot.