I have a (somewhat) similar problem.
My task is to begin working on the CSV file: IBGE_RS_Popul_Censo_2022_por_Munic.csv (15.2 KB)
I just need two columns of this file: a) Nome_Munic (the name of the municipality), and b) Populacao (the population of this municipality). Both of these columns are on the “String” type.
I first used the node “String to number”, with the option “Integer” type for the output, and applied the “thousands separator” as “.” and also tried with or without the “decimal separator” as “,” but after several trials, I got no thousands separator at all on the output of this node. The only exception I got was when I applied the option “Double”, but it didn’t make much sense to me, because the file describes the number of inhabitants per city, and therefore there are only integers for such a reality… And even so, I only got a comma (“,”) for “thousands separator”, but not a “.” (which is the standard for Brazil).
Would you mind help me with this (probably elementary) question?
Thanks a lot.
In row121 (row122 in excel) there is a letter - “l” - before the number. This is why The String To Number Node wasn’t working. This is the only Letter I found in the column - see the output of String Manipulation Node Find letter.
Depending on your needs you might want to strip out all letter in the column no matter what. if you do look in the String Manipulation Node replace letters with “”.
There are some rows with have a missing value e.g. row39. Depending on your needs you can replace that missing value with something else using the Missing Value node. I have just set up the node to replace all missing values with -1, but, this node can do much more.
I tried multiple times in different ways to get the String to number node to add “.” as a thousand separator and could not. I also looked and other nodes.
Hope this helps
One more thing, If you do find out how to make a thousand separator a “.” please could you let me know.
Just a tip here… you are talking about location settings, so knime have this configuration too to be make as US system or you can set for your location. You can manipulate it too as you wish, but I think more comfortable if you set as your needs.
At File > Preferences > Prefrerence topic, you will find the render option for basic settings and advanced ones.
If I was to change the preferences would that change be universal? e.g. would it change across every Workspace, Or could I have a work space for Brazil and one for Germany and one for anything else I desire etc?
Generally, preferences are per-workspace, except the proxy settings. So I would assume different renderer settings could be used by switching workspaces. However, be aware that this is just the renderer. I do not think that it also applies to the default number parsing configuration in nodes like String to Number.