Dataiku DSS 7 AMA is live! Learn more

How to remove scientific notation in a column ?

Dataiker
Dataiker
How to remove scientific notation in a column ?
Jump to solution

I have numbers like that in my dataset:





I want to concatenate them but using a normal decimal format such as 0.0008



How can I do that ? I know I can use Python but I'd prefer not to

1 Reply
Dataiker
Dataiker

Hi,



You can use the "format" function of the formula language.



This function takes a "printf format string" and applies it to any value.



In your specific case, if you want for example 5 decimal places, use:




format("%.5f", my_column_name)


Format strings are immensely powerful, they allow you to truncate strings, change precision, switch between numerical notations, left-pad strings, pad numbers with zeros, ...



More information about format strings:

https://en.wikipedia.org/wiki/Printf_format_string



DSS formula use the Java variant of format strings:

https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#summary



For more information about formulas, see:

https://www.dataiku.com/learn/guide/code/misc/formula-master.html

http://doc.dataiku.com/dss/latest/advanced/formula.html



 

Labels (2)