Jump to content
Sign in to follow this  

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

Recommended Posts


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

For example, base data is

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

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

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this