diff --git a/common_task.py b/common_task.py index 8cc21fb..a254c9a 100644 --- a/common_task.py +++ b/common_task.py @@ -56,10 +56,12 @@ def do_the_difference(today_file, last_file, column_for_diff, fresh_output, expi expired_df = pd.merge(last_file_df, today_df, on=column_for_diff, how='left', indicator=True, suffixes=('', '_ignored')).query('_merge == "left_only"').drop(['_merge'], axis=1) child_df_copy = expired_df.copy() if gi =="g": - child_df_copy['Job Key'] = 'g_' + child_df_copy['Job Key'] + child_df_copy['Job Key'] = 'g_' + child_df_copy['Job Key'].astype(str) + expired_df['Job key'] = expired_df['Job key'].astype(str) expired_df = pd.concat([expired_df, child_df_copy], ignore_index=True) else: # jobId - child_df_copy['jobId'] = 'i_' + child_df_copy['jobId'] + child_df_copy['jobId'] = 'i_' + child_df_copy['jobId'].astype(str) + expired_df['jobId'] = expired_df['jobId'].astype(str) expired_df = pd.concat([expired_df, child_df_copy], ignore_index=True) expired_df.to_csv(expired_output, index=False)