Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df_out = df_new.loc[:,['ID','Date']]
- df_out['In'] = '0'
- for i in df_new.index:
- temp_id = df_new['ID'][i]
- temp_Data = df_new['Date'][i]
- Data_number = classinformation.index(temp_Data)
- if(Data_number > 1):
- temp_preData = classinformation[Data_number - 1].replace("-", "")
- exec("flag = temp_id not in list(df_set%s['ID'])"%temp_preData)
- #print(temp_preData)
- if flag:
- df_out['In'][i] = '1'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement