Join us on July 16th as we explore real-world Reinforcement Learning Learn more

Double number representation

Level 2
Double number representation

Hi,

I have several columns being imported as double where the format is X.XXXXXX0N where 0N is the exponential 

How can I show the number as it is (not Exponential) I am not interested in rounding the number.

secondly is it possible, without rounding the number to limit the values shown after the comma but keeping the full number precision?

 

0 Kudos
6 Replies
Dataiker
Dataiker

Hi, 

In a Prepare recipe, you can try to reformat your column using the Formula processor with something like:

format(‘%.Xf’, COLUMN_NAME)

... X being the number of digits you want to show (it helps if your digit length is the same across rows) 

DSS Fanboy
Level 2
Author

This is changing the type into a string assuming 

 

format("%.Xf", COLUMN_NAME)

 

instead of 

format(‘%.Xf’, COLUMN_NAME)

 which generated an error.

 

I do not need to change format I need just sot SEE lees precision but keep the number as a double with the full prevision stored in the table

@VinceDS 

Dataiker
Dataiker

Indeed. 

If it's just to display then can you create an additional column with that formula? Here is an example output I was able to generate

Screenshot 2020-01-21 at 11.55.47.png

DSS Fanboy
Level 2
Author

@VinceDS 

 

thanks Vince for the work around

 

I hope DataIku fixes this gap

I understand a workaround but the user should be able to review and change how data appears without changing the format of underlying data or creating multiple columns for each format needed....

 

every time have to deal with amounts i have to carry twice the columns in each table...

Dataiker
Dataiker

Hi Giulio,

What would be your preferred solution, display decimals with a default number of digits?

Thanks

Level 2
Author

Yes @Manuel 

without having to round or convert the underlying number in the table

 

viewing 123,234,324.35 or123,234,324.34 (do not mind the visual rounding) 

were the number is actually 123234324.348763456734 and is not rounded for calculation purposes

rather than viewing  1.2323432434876345E8