How to keep a ".0"

Hey ! I Have a string column with this kind of data
The things is : I need to convert it to number cell type, I’m using the node string to number (set double, decimal “.”) but I lost every “.0”
my cell 6585322.0 became 6585322
How can i fix this ?

Hi and welcome -

I’m assuming by ‘lost’ you mean “i want the cells to render including at least one decimal place”. If you right click on the column header of the double column in the specific output table that you’re viewing, you can change the renderer to full precision:

1 Like

Yes, but then when i export it in csv and read it with Notepad ++ i can see that i’m still missing my .0

Hmm… when you’re putting stuff in a CSV, there is no data type - it’s just characters of text - it’s up to the technical program (Excel, whatever, …) to interpret the datatype for itself (or you can tell it.)
It sounds like you’re wanting a formatter in the CSV writer to ensure that all numbers written have at least one decimal place so that a human reader, not using a program suited for specifying datatypes, can look at the strings of text and see the precision visually?

the major issue is that this exel is used by another system that requires .csv
I whish i could ask knime to keep me 1 decimal after the number when changing it from string to number.
The other system will not read line with data different from this “zzzzzzzzn.n” kinda format number
(thanks for the replies so far :smile: )

Have to run - but if so, there’s this configuration on the CSV Writer that will add the .0 (use scientific notation) - but that might introduce actual scientific notation on larger numbers. I’ll make an RFE ticket later in the day.


Try to change KNIME Preferences for Double.

For internal users, AP-13014 was created for this RFE.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.