pandasのstrアクセサを使うと以下のようになります。
python
1>>> print(df)
2 金額
30 0 44円
41 10 105円60銭
52 20 139円70銭
63 30 170円50銭
74 40 198円
85 50 206円80銭
96 100 214円50銭
107 100 220円
11>>> df['金額'] = (df['金額']+'銭').str.replace('円', '.').str.replace('[.銭]銭', '円', regex=True)
12>>> print(df)
13 金額
140 0 44円
151 10 105.60円
162 20 139.70円
173 30 170.50円
184 40 198円
195 50 206.80円
206 100 214.50円
217 100 220円
正規表現の先読みアサーションまで使うと以下のようになります。
python
1>>> df['金額'] = df['金額'].str.replace('円(?=.)', '.', regex=True).str.replace('銭', '円')
2>>> print(df)
3 金額
40 0 44円
51 10 105.60円
62 20 139.70円
73 30 170.50円
84 40 198円
95 50 206.80円
106 100 214.50円
117 100 220円
参考
pandasの文字列メソッドで置換や空白削除などの処理を行う
公式ドキュメント 正規表現のシンタックス
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。