我有一个似乎包含特殊字符€一个字符串: my_str # [1] "0€ de frais de courtage"
my_str == "0€ de frais de courtage" # [1] FALSE
gsub("€","X",my_str) # [1] "0€ de frais de courtage"
gsub("€","X","0€ de fra
我需要在欧洲大陆格式的字符串的货币字符串转换成浮点数: 输入: '6.150.593,22 €'
要认识到小数点是逗号,千位分隔符是一段文字。 输出: 6150593.22
我读到这些问题,但它们只适用于美元的货币和区域设置: How do I convert a currency string to a floating point number in Python? python: h