Planet Python 中文 关注 LernerPython 博客,作者 Reuven Lerner:Pandas Grouper NaNs:异常日期为何会导致空分组” 使用 Python Pandas 的 Grouper 时遇到 NaN 值?groupby + Grouper 会根据指定的粒度,从最早到最晚对 datetime 值进行切分。如果存在任何一个 datetime 值过早或过晚,就会产生大量 NaN 值。在此情况下,dropna 通常很有帮助。 LernerPython blog, from Reuven Lerner: Pandas Grouper NaNs: Why outlier dates create empty groups lernerpython.com Planet Python 中文 RSS thenote.app