0
更大的第一次约会,我想拿到第一周一月比7月10日更大的日期列表,我想知道是否有避免for循环的优雅的解决方案/列表理解。 这里是我到目前为止的代码,让超过10件的所有七月星期一:周大于x
import pandas as pd
last_date = '08-Jul-2016'
monday2_dates=pd.date_range('1-Jan-1999',last_date, freq='W-MON')
g1=pd.DataFrame(1.0, columns=['dummy'], index=monday2_dates)
g1=g1.loc[(g1.index.month==7) & (g1.index.day>=10)]
http://stackoverflow.com/questions/6558535/python-find-the-date-for-the-first-monday-after-a-given-a-date – Tim