Truncation of leading '0's

11 views
Skip to first unread message

Parthasarathi Mukhopadhyay

unread,
Jun 27, 2021, 10:44:26 AM6/27/21
to openr...@googlegroups.com
Dear all

I'm trying to split an ISSN (non numerical/text) column [where in some cases journals having more than one ISSNs are joined by '+' sign] into two columns.

But the action is producing two numerical columns by truncating the leading '0's if present like the column given below:

13524658

13524658

00991112

991112

10008713

10008713

10008713

10008713

10008713

10008713

10008713

10008713

10008713

10008713

03400204

3400204

03400204

3400204

10690565

10690565


Any way out?

Regards
-----------------------------------------------------------------------
Parthasarathi Mukhopadhyay
Professor, Department of Library and Information Science,
University of Kalyani, Kalyani - 741 235 (WB), India
-----------------------------------------------------------------------

Thad Guidry

unread,
Jun 27, 2021, 11:44:37 AM6/27/21
to openr...@googlegroups.com
If the column data type is Numbers, then truncation of leading 0's is expected.
What happens if you switch the column data type instead to Text?



--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openrefine/CAGM_5uZf5wuXaoCSxGYC7kM-y_kSZX13kEf--oXKOKhzXpGcOA%40mail.gmail.com.

Thad Guidry

unread,
Jun 27, 2021, 11:49:36 AM6/27/21
to openr...@googlegroups.com
Perhaps you forgot to uncheck the "Guess cell type"?  Which would do the autoconvert to Numbers in the new columns, and what you probably don't want, instead, you want to retain the original Text data type from the original column.  So uncheck that option in the dialog like so

image.png

Parthasarathi Mukhopadhyay

unread,
Jun 27, 2021, 11:57:10 AM6/27/21
to openr...@googlegroups.com
Thanks Thad. The original ISSN column is textual (non numeric). The new splitted columns ISSN 1 and ISSN 2 converted into numbers (Green colour right justified) automatically with truncated leading zeros.

But the unhecking of "Guess cell type" option as suggested solved the problem.

Thanks a lot.

Best regards


Reply all
Reply to author
Forward
0 new messages