|
|
@@ -35,7 +35,7 @@ def read_and_process_csv(input_file, output_file, brand_columns, asin_columns, u
|
|
|
output_dir.mkdir(parents=True, exist_ok=True)
|
|
|
|
|
|
# 使用pandas读取CSV文件
|
|
|
- df = pd.read_csv(input_file, encoding='utf-8', keep_default_na=False)
|
|
|
+ df = pd.read_csv(input_file, encoding='cp936', keep_default_na=False)
|
|
|
|
|
|
# 获取要处理的列的索引
|
|
|
if use_letters: # 如果使用列字母
|
|
|
@@ -56,7 +56,7 @@ def read_and_process_csv(input_file, output_file, brand_columns, asin_columns, u
|
|
|
|
|
|
# 定义要处理的CSV文件路径、输出文件路径以及需要添加超链接的列索引或列字母和亚马逊搜索的基础URL
|
|
|
output_dir = Path('temp')
|
|
|
-input_csv_path = output_dir / '测试_utf8.csv'
|
|
|
+input_csv_path = Path('/home/mrh/code/excel_tool/temp/测试.csv')
|
|
|
output_csv_path = output_dir / '测试_processed.csv'
|
|
|
brand_columns = ['C', 'D', 'E'] # 品牌列
|
|
|
asin_columns = ['H', 'L', 'P'] # ASIN列
|