回答編集履歴
1
Update
test
CHANGED
@@ -34,6 +34,8 @@
|
|
34
34
|
|
35
35
|
220円
|
36
36
|
|
37
|
+
35銭
|
38
|
+
|
37
39
|
'''.strip()
|
38
40
|
|
39
41
|
|
@@ -46,11 +48,13 @@
|
|
46
48
|
|
47
49
|
df['金額'].str
|
48
50
|
|
49
|
-
.extract(r'(\d+)円((\d+)
|
51
|
+
.extract(r'((\d+)円)?((\d+)銭)?')
|
50
52
|
|
51
|
-
.
|
53
|
+
# .extract(r'(\d+(?=円))?(\d+(?=銭))?')
|
52
54
|
|
55
|
+
.fillna(0).astype(int, errors='ignore')
|
56
|
+
|
53
|
-
.apply(lambda x: f'{x[
|
57
|
+
.apply(lambda x: f'{x[1]+(x[3]/100 if x[3] else 0)}円', axis=1))
|
54
58
|
|
55
59
|
|
56
60
|
|
@@ -78,4 +82,6 @@
|
|
78
82
|
|
79
83
|
7 220円
|
80
84
|
|
85
|
+
8 0.35円
|
86
|
+
|
81
87
|
```
|