我如何找到使用熊猫的最后一个工作日?
我找到了m / end的解决方案,但是使用此链接,我认为Qend也可以工作,但不能实现
from pandas.tseries.offsets import BMonthEnd
from datetime import date
d=date.today()
offset = BQuarterEnd()
offset2 = BMonthEnd()
#Last day of current month
offset.rollforward(d)
NameErrorTraceback (most recent call last)
<ipython-input-105-32be55051bf4> in <module>()
4 d=date.today()
5
----> 6 offset = BQuarterEnd()
7 offset2 = BMonthEnd()
8
NameError: name 'BQuarterEnd' is not defined
我使用了此链接: http://pandas.pydata.org/pandas-docs/version/0.7.1/timeseries.html