joycecast commited on
Commit
ce07674
·
verified ·
1 Parent(s): 1199868

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -55,7 +55,7 @@ def convert_ci(by_line_item_file, combined_file, password, max_rows):
55
  # Clean Tariff_Number and MID_Code for consistent merging
56
  combined_df["Tariff_Number"] = combined_df["Tariff_Number"].apply(lambda x: str(x).replace('.0', '') if isinstance(x, float) and str(x).endswith('.0') else str(x))
57
  combined_df["MID_Code"] = combined_df["MID_Code"].astype(str)
58
- combined_df["Manufacturer_Zip"] = combined_df["Manufacturer_Zip"].astype(str)
59
 
60
  # Format manufacturer address components
61
  def extract_address_parts(row):
 
55
  # Clean Tariff_Number and MID_Code for consistent merging
56
  combined_df["Tariff_Number"] = combined_df["Tariff_Number"].apply(lambda x: str(x).replace('.0', '') if isinstance(x, float) and str(x).endswith('.0') else str(x))
57
  combined_df["MID_Code"] = combined_df["MID_Code"].astype(str)
58
+ combined_df["Manufacturer_Zip"] = combined_df["Manufacturer_Zip"].astype(str).apply(lambda x: f"0{x}" if len(x) == 5 else x)
59
 
60
  # Format manufacturer address components
61
  def extract_address_parts(row):