Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于:
foo = pd.Series(index=pd.bdate_range(datetime.date(2000,1,1),datetime.date(2001,1,1))) foo.resample("BMS") foo.resample("BMS").resample("B")
第一次重采样从 2000-01-03 开始,第二次重采样从 2000-01-04 开始
这是一个错误还是我错过了对重采样工作原理的概念性理解?
提前致谢!
pandas 尝试推断“关闭”和“标签”参数值,以便默认重采样行为正确。这是推断这些值以进行上采样的错误。我们将修复下一个版本。感谢您的错误报告。
作为一种解决方法,执行 foo.resample("BMS").resample("B", closed="right", label="right")