4 ms·
How do you deal with decimal separator ',' used in a few countries instead of '.'?
by andi999 4y ago
How do you deal with decimal separator ',' used in a few countries instead of '.'?
- avgcorrection 4y agoMost countries by raw country count.
- andi999 4y agoTrue. https://en.wikipedia.org/wiki/Decimal_separator#/media/File:DecimalSeparator.svg https://en.wikipedia.org/wiki/Decimal_separator#/media/File:...
- deaddodo 4y agoLess people, by raw population count.
- deleted 4y ago[deleted]
- bzxcvbn 4y agoJust for fun (and because I don't like unsourced claims) I fired up Mathematica to sum up the population of the countries listed. Here are the results: In[1]:= comma = {"Albania", "Algeria", "Andorra", "Angola", "Argentina", "Armenia", "Austria", "Azerbaijan", "Belarus", "Belgium", "Bolivia", "BosniaHerzegovina", "Brazil", "Bulgaria", "Cameroon", "Canada", "Chile", "Colombia", "CostaRica", "Croatia", "Cuba", "Cyprus", "CzechRepublic", "Denmark", "EastTimor", "Ecuador", "Estonia", "FaroeIslands", "Finland", "France", "Germany", "Georgia", "Greece", "Greenland", "Hungary", "Iceland", "Indonesia", "Italy", "Kazakhstan", "Kosovo", "Kyrgyzstan", "Latvia", "Lebanon", "Lithuania", "Luxembourg", "Macau", "Mauritania", "Moldova", "Mongolia", "Montenegro", "Morocco", "Mozambique", "Namibia", "Netherlands", "Macedonia", "Norway", "Paraguay", "Peru", "Poland", "Portugal", "Romania", "Russia", "Serbia", "Slovakia", "Slovenia", "Somalia", "SouthAfrica", "Spain", "Suriname", "Sweden", "Switzerland", "Tunisia", "Turkey", "Turkmenistan", "Ukraine", "Uruguay", "Uzbekistan", "Venezuela", "Vietnam", "Zimbabwe"}; In[2]:= Plus @@ (Entity["Country", #]["Population"] & /@ comma) Out[2]= Quantity[1990645326, "People"] In[3]:= period = {"Australia", "Bangladesh", "Botswana", "Cambodia", "Canada", "China", "DominicanRepublic", "Egypt", "ElSalvador", "Estonia", "Ethiopia", "Ghana", "Guatemala", "Guyana", "Honduras", "HongKong", "India", "Ireland", "Israel", "Jamaica", "Japan", "Jordan", "Kenya", "NorthKorea", "SouthKorea", "Libya", "Liechtenstein", "Luxembourg", "Macau", "Malaysia", "Maldives", "Malta", "Mexico", "Myanmar", "Namibia", "Nepal", "NewZealand", "Nicaragua", "Nigeria", "Pakistan", "Panama", "Peru", "Philippines", "Qatar", "SaudiArabia", "Singapore", "Somalia", "SriLanka", "Switzerland", "Syria", "Taiwan", "Tanzania", "Thailand", "Uganda", "UnitedArabEmirates", "UnitedKingdom", "UnitedStates"}; In[4]:= Plus @@ (Entity["Country", #]["Population"] & /@ period) Out[4]= Quantity[5210743028, "People"] It's not accurate because I'm not taking into account things such as "only in French Canada" or "only in currency", so some countries are double counted. But it gives a rough estimate. Five billion people for the dot, two for the comma.
- evanem 4y agoThat is really useful information. Thanks!
- avgcorrection 4y agoI felt like I had to add “raw count” even though the OP only mentioned countries since someone would inevitably feel chafed.
- deaddodo 4y agoOnly “chafed” as far as it’s misrepresentative.
- evanem 4y agoThis new version has a Convert Number Format command that can be used to convert between the two formats. It just occurred to me I didn't take that into account for the new statistics operations. I'll be sure to fix it.