Jump to content

[SOLVED] Convert String Attribute to Int Attribute? (No not the atof() expr)


bentraje

Recommended Posts

Hi,

Is there a way I can change the string attribute to an int attribute.

For example, base data is

BEFORE
ptnum, name
1,  joint_a_sel,
2, joint_b_sel,
3, joint_d_sel,
4, joint_a_sel,
5, joint_c_sel,

resulting data would be like

AFTER
ptnum, name, name_int
1,  joint_a_sel, 1
2, joint_b_sel, 2
3, joint_d_sel, 4
4, joint_a_sel, 1
5, joint_c_sel, 3

I'm not sure what's the proper nomenclature for this task but hopefully the before and after makes it clear.

Is there a way around this?

P.S. AFAIK, the atof() expression is only for strings that already looks like a number but is labelled as a string.

Edited by bentraje
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...