Commit ff517d27 authored by 邱阿朋's avatar 邱阿朋

fix(vc): 修复退货数据总金额计算错误

- 在对退货数据进行处理时,发现总金额字段包含逗号,导致无法正确计算
- 在计算前,先移除总金额字段中的逗号,并将其转换为浮点数类型
- 此修改确保了总金额的正确计算,提高了数据准确性
parent f801b034
......@@ -73,6 +73,7 @@ class ReturnGoods(AutoInterface):
self.logger.warning(f"{return_id} 订单详情读取失败")
continue
item_data['Total amount'] = item_data['Total amount'].str.replace(',', '').astype(float)
# 按 'Purchase order' 和 'ASIN' 分组,并对 'Quantity' 和 Total amount 进行求和
item_data_result = item_data.groupby(['Purchase order', 'ASIN', 'Reason'], as_index=False).agg({
'Quantity': 'sum',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment