Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -146,6 +146,10 @@ def convert_ci(by_line_item_file, combined_file, password, max_rows):
|
|
| 146 |
mapping_df = pd.read_csv("MID_replace.csv")
|
| 147 |
mid_map = dict(zip(mapping_df["SHEIN_MID_Code"], mapping_df["Replacement"]))
|
| 148 |
merged_df["MID_Code"] = merged_df["MID_Code"].apply(lambda x: re.sub(r"[^\w]", "", x)).map(mid_map).fillna(merged_df["MID_Code"])
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
|
| 150 |
# Save merged output partitioned by user-defined max_rows
|
| 151 |
outputs = []
|
|
|
|
| 146 |
mapping_df = pd.read_csv("MID_replace.csv")
|
| 147 |
mid_map = dict(zip(mapping_df["SHEIN_MID_Code"], mapping_df["Replacement"]))
|
| 148 |
merged_df["MID_Code"] = merged_df["MID_Code"].apply(lambda x: re.sub(r"[^\w]", "", x)).map(mid_map).fillna(merged_df["MID_Code"])
|
| 149 |
+
|
| 150 |
+
# Removed the special characters
|
| 151 |
+
merged_df['Manufacturer_Name'] = merged_df['Manufacturer_Name'].apply(lambda x: re.sub(r"[^\w]", " ", x))
|
| 152 |
+
merged_df['Manufacturer_Address_1'] = merged_df['Manufacturer_Address_1'].apply(lambda x: re.sub(r"[^\w]", " ", x))
|
| 153 |
|
| 154 |
# Save merged output partitioned by user-defined max_rows
|
| 155 |
outputs = []
|