Why doesn't my pandas rolling().apply() work when the series contains collections?

前端 未结 1 719
时光取名叫无心
时光取名叫无心 2020-12-03 18:35

I\'ve got a pandas series in which each cell is a tuple. I\'m trying to do a rolling().apply() on that series, and the function I\'m trying to apply is never getting called

相关标签:
1条回答
  • 2020-12-03 18:55

    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.

    0 讨论(0)
提交回复
热议问题