I have an excel file form which is likely below in the same folder for my python program: Note: / is the divider for each cell.
*Commodity/Country/...
1205.10.00.10 — Low erucic/ Canada/
1210.10.00.00 — Hop cones / Spain/*
I want to split the first column to and save it in csv file:
120510/Canada/...
121000/Spain/...
I wrote the code below, Could you do me a favor and correct it??
import pandas as pd
excel_file_path = 'Canada_scrapping_result.xlsx'
df = pd.read_excel(excel_file_path)
for A1 in df.columns:
df[A1] = df[A1].str.replace(r'\W',"")
df.to_excel("Remove_characters.xlsx")