def save_combined_predictions(df,directory,filename,note=''):
    #If previous combined predictions already exist, archive existing ones by renaming to append datetime
    try:
        modified_date = time.strptime(time.ctime(os.path.getmtime(directory+filename)), '%a %b %d %H:%M:%S %Y')
        modified_date = datetime.fromtimestamp(time.mktime(modified_date)).strftime('%m-%d-%y_%H%M')
        archived_file = directory+'Archive/'+filename[:len(filename)-4]+'--'+modified_date+'.csv'
        os.rename(directory+filename,archived_file)
        log.info('File already exists with given filename, archiving old file to: '+ archived_file)
    except WindowsError:
        pass
    #Save predictions
    df.to_csv(directory+filename, index=False)
    log.info(filename % 'Predictions saved: %s')
dataset/ETHPy150Open theusual/kaggle-seeclickfix-ensemble/Bryan/data_io.py/save_combined_predictions/swapped operands of `%`