Why doesn't my pandas rolling().apply() work when the series contains collections?
This will not work because the pandas.DataFrame.rolling function returns a Window or Rolling sub-classed for the particular operation while pandas.DataFrame.apply Applies function along input axis of DataFrame. As mentioned by ayhan, in this post.