Openrefine: Number to String (NO scientific notation)

Created on 12 Aug 2013  ·  4Comments  ·  Source: OpenRefine/OpenRefine

Hi *,

I have an column of type integer and I want to transform a string, but the value 21358081 transform it in scientific notation, ie what makes 2.1358081E7.

Obviously I want to get the string: 21358081

The changes I did in two ways and the result is the same (scientific notation):

  1. Edit Cells --> Common Transforms --> To text
  2. Edit Columns --> Add column based on this column, and, my expression (GREL) is value.toString()

Can you help me?

Thanks

question

Most helpful comment

Another solution: use language "Python / Jython" rather than "GREL" with the expression "return str(value)"

All 4 comments

I can't reproduce this in the current code. Can you provide an example project which has the values that you're trying to convert? I suspect that perhaps they're floating point numbers (which will get formatted as you describe), not integers.

Hi, thanks for you reply.

The column represents ID values ​​of a person and I want to export to xml, but when I Export --> Templating... makes me an ID number in scientific notation (two ways in last message).

The Google Refine version that I have is:
Version 2.5 [r2407]

Thanks again,
Jose

Hi Tom.

It's correct. I used: value.floor().toString()

Solved it.

Thanks,
Jose

Another solution: use language "Python / Jython" rather than "GREL" with the expression "return str(value)"

Was this page helpful?
0 / 5 - 0 ratings