Community Conundrum 10: The Titanic is now live Learn more

How to remove scientific notation in a column

How to remove scientific notation in a column

Formatting numbers can often be a tedious data cleaning task.

It can be made easier with the format() function of the DSS Formula language. This function takes a "printf format string" and applies it to any value. 

Format strings are immensely powerful, as they allow you to truncate strings, change precision, switch between numerical notations, left-pad strings, pad numbers with zeros, etc. More specifically, DSS formulas use the Java variant of format strings.

For example, you may have a column of very small numbers represented in scientific notation. If instead you wanted to convert this column to 5 decimal places, you can use:

format("%.5f", my_column_name)

 

What’s next?

For more information, see:

 

Labels (3)
Version history
Revision #:
6 of 6
Last update:
3 weeks ago
Updated by:
 
Contributors