質問編集履歴
2
表と合っていない記述があったので変更しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -44,9 +44,9 @@
|
|
44
44
|
sl = df.iloc[:,[33]] #'金額'のある列
|
45
45
|
|
46
46
|
for i in df.iterrows():
|
47
|
-
if (cd==
|
47
|
+
if (cd==5555):
|
48
48
|
df.insert(34,"出張費",sl)
|
49
|
-
elif (cd==
|
49
|
+
elif (cd==6666):
|
50
50
|
df.insert(35,"接待費",sl)
|
51
51
|
else:
|
52
52
|
df.insert(36,"雑費",sl)
|
1
例に挙げた列番号が同じところがあったので修正しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -41,7 +41,7 @@
|
|
41
41
|
df = pd.read_excel('sortdataei12.xlsx',sheet_name = 'Sheet1')
|
42
42
|
|
43
43
|
cd = df.iloc[:,[32]] #'金額コード'のある列
|
44
|
-
sl = df.iloc[:,[
|
44
|
+
sl = df.iloc[:,[33]] #'金額'のある列
|
45
45
|
|
46
46
|
for i in df.iterrows():
|
47
47
|
if (cd==7777001):
|