taskforce-dev commited on
Commit
ee8c281
·
1 Parent(s): 5792574

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -27,14 +27,14 @@ def process_csv(input_file):
27
  '売上単価': '単価',
28
  '得意先名': 'タグ',
29
  '行摘要': '得意先名',
30
- 'ユーザーNO1': 'ユーザ定義項目1 ',
31
  '受注_備考': 'メモ'
32
  }
33
  df.rename(columns=column_name_mapping, inplace=True)
34
 
35
  # Convert the '請求日' column from YYYYMMDD to YYYY/MM/DD format
36
  df['請求日'] = df['請求日'].astype(str).apply(lambda x: x[:4] + '/' + x[4:6] + '/' + x[6:8])
37
- df['ユーザ定義項目'] = df['請求日']
38
 
39
 
40
  # Group by '請求番号' and modify rows
@@ -50,6 +50,7 @@ def process_csv(input_file):
50
  new_group.iloc[0, new_group.columns.get_loc('数量')] = ''
51
  new_group.iloc[0, new_group.columns.get_loc('単価')] = ''
52
  new_group.iloc[0, new_group.columns.get_loc('単位')] = ''
 
53
  clear_cols = ['得意先コード', '請求日', '請求番号', 'タグ', '得意先名', 'メモ']
54
  for col in clear_cols:
55
  if col in new_group.columns:
 
27
  '売上単価': '単価',
28
  '得意先名': 'タグ',
29
  '行摘要': '得意先名',
30
+ 'ユーザーNO1': 'ユーザ定義項目1',
31
  '受注_備考': 'メモ'
32
  }
33
  df.rename(columns=column_name_mapping, inplace=True)
34
 
35
  # Convert the '請求日' column from YYYYMMDD to YYYY/MM/DD format
36
  df['請求日'] = df['請求日'].astype(str).apply(lambda x: x[:4] + '/' + x[4:6] + '/' + x[6:8])
37
+ df['ユーザ定義項目1'] = df['請求日']
38
 
39
 
40
  # Group by '請求番号' and modify rows
 
50
  new_group.iloc[0, new_group.columns.get_loc('数量')] = ''
51
  new_group.iloc[0, new_group.columns.get_loc('単価')] = ''
52
  new_group.iloc[0, new_group.columns.get_loc('単位')] = ''
53
+ new_group.iloc[0, new_group.columns.get_loc('ユーザ定義項目1')] = ''
54
  clear_cols = ['得意先コード', '請求日', '請求番号', 'タグ', '得意先名', 'メモ']
55
  for col in clear_cols:
56
  if col in new_group.columns: