joycecast commited on
Commit
6445858
·
verified ·
1 Parent(s): 81d8dd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -138,6 +138,12 @@ def convert_ci(by_line_item_file, combined_file, password, max_rows):
138
  'CVD_Case_Number', 'AD_Non_Reimbursement_Statement',
139
  'AD-CVD_Certification_Designation'
140
  ]
 
 
 
 
 
 
141
  for col in column_order:
142
  if col not in merged_df.columns:
143
  merged_df[col] = ""
@@ -178,4 +184,4 @@ iface = gr.Interface(
178
  )
179
 
180
  if __name__ == "__main__":
181
- iface.launch()
 
138
  'CVD_Case_Number', 'AD_Non_Reimbursement_Statement',
139
  'AD-CVD_Certification_Designation'
140
  ]
141
+
142
+ # Update SHEIN Incorrect MID:
143
+ MID_mapping_df = pd.read_csv("MID_replace.csv")
144
+ mid_map = dict(zip(MID_mapping_df["SHEIN_MID_Code"], MID_mapping_df["Replacement"]))
145
+ merged_df["MID_Code"] = merged_df["MID_Code"].map(mid_map).fillna(merged_df["MID_Code"])
146
+
147
  for col in column_order:
148
  if col not in merged_df.columns:
149
  merged_df[col] = ""
 
184
  )
185
 
186
  if __name__ == "__main__":
187
+ iface.launch()