def dateMismatch(dates, days=10):
'''
Check if dates are not within a certain number of days of each other
@param dates: Iterable container of pandas timestamps
@param days: Number of days
@return true if they are not with 10 days, false otherwise
'''
for combo in combinations(dates,2):
if np.abs(combo[0] - combo[1]) > pd.to_timedelta(days, 'D'):
return True
return False
评论列表
文章目录