Hi All,
I am just beginning Alteryx and had the following question. I am hoping to convert a string of a number (i.e. ten) to an integer (i.e. 10). Is there an easy way to do this?
Thanks in advance!
Before:
Ten
After:
10
Solved! Go to Solution.
Hello @BC1414
You could change the data type by using a select tool and changing the data type from a string to an int.
Alternatively, if you want to perform some calculations with this string you could also wrap the string in tonumber() using a formula tool which will allow you to utilize the string as number,
Hope this helps!
Hi @BC1414
As far as i know, with just Alteryx you will not be able to transform written numbers to numbers.
But python has this cool library called word2number (https://pypi.org/project/word2number/) that do exactly that.
Run Alteryx as Admin (to be able to install the library) and run the attached workflow.
Glad I looked into this solution. I just downloaded word2number library. But how can I use this library on Alteryx? Should I place this library on a specific folder?
Thanks,
Krishna
1) Close Alteryx and open it again as Admin
2)Download the attached workflow, click on python, the bellow block of code and on Run. This will install the library for Alteryx.
Thanks much.!
May I ask you, should we always run as Administrator while using python tool or python library? Is that the way it works???
No, you just need to do that to have the sufficient role to install the library inside Alteryx folder. After that, you can run it normally.
Thank you so much @Felipe_Ribeir0 😊
No problem @KrishnaChithrathil ! If you feel that your problem was addressed, please mark the answer as a solution :). Thanks!
User | Count |
---|---|
53 | |
27 | |
26 | |
24 | |
21 |