我有一个 .CSV 文件,其中几乎没有包含数字的记录,这些记录用双引号括起来(例如“455,365.44”),引号之间有逗号。我需要从记录的数值中删除逗号(“455,365.44”在处理后应该看起来像 455365.44),以便我可以在文件的进一步处理中使用它们。
这是文件的示例
column 1, column 2, column 3, column 4, column 5, column 6, column 7
12,"455,365.44","string with quotes, and with a comma in between","4,432",6787,890,88
432,"222,267.87","another, string with quotes, and with two comma in between","1,890",88,12,455
11,"4,324,653.22","simple string",77,777,333,22
我需要结果如下:
column 1, column 2, column 3, column 4, column 5, column 6, column 7
12,455365.44,"string with quotes, and with a comma in between",4432,6787,890,88
432,222267.87,"another, string with quotes, and with two comma in between",1890,88,12,455
11,4324653.22,"simple string",77,777,333,22
PS:我只需要像这样转换数字的值,字符串值应该保持不变。
请帮忙...