Darklight11 / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

commas in numbers, not allowing conversion to numbers. #259

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download this data file: http://www.albany.edu/sourcebook/csv/t6322008.csv
2. Load it into Google Refine
3. All numbers with commas in them are still text, even if you tell it to 
convert them to numbers.
4. After writing a formula to replace(value,',','') - the text 1,290 still has 
the comma in it.

What is the expected output? What do you see instead?
If I ask it to transform a column into numbers, commas shouldn't matter.

What version of the product are you using? On what operating system?
Just downloaded it today, Windows 7 x64.

Please provide any additional information below.

Original issue reported on code.google.com by sp1d...@gmail.com on 27 Nov 2010 at 6:49

GoogleCodeExporter commented 9 years ago
Numbers with embedded commas are ambiguous because the comma could represent a 
thousands separator (U.S.) or a decimal point (Europe).

The problem with replace() not working I haven't been able to reproduce with 
the current release.  Note that if you want to convert to numbers, you can do 
it all a single pass using value.replace(',','').toNumber() as your expression.

Original comment by tfmorris on 3 Mar 2012 at 10:18

GoogleCodeExporter commented 9 years ago
Give me a break. That's not a solution. We are both from the USA, Tom. It 
should be fairly unambiguous.

Original comment by sp1d...@gmail.com on 3 Mar 2012 at 11:23