Conversion between Python and Arcade
I can write an expression in Python to get new data in a specific order through the expression ( !BQCODE![3:5] ) but I do not know how to write that expression in the Arcade language.
Is there anyone who can help?
Gratefully
Solved! Go to Solution.
In the Calculate Field tool, the Arcade expression
Mid($feature.BQCODE, 3, 2)
is the equivalent of the Python expression
!BQCODE![3:5]
Python uses a start index and an end index. Arcade uses the start index and the number of characters.
Function Reference | ArcGIS Arcade | ArcGIS Developers
may be of use.. perhaps the Text portion
Thank you
But I want to get to the expression quickly. I searched for it but did not find it.
Can you write the expression here??
Gratefully
It helps to provide information about data types and an example or two.
correct
but I cannot reach the correct expression in Arcade, but in Python I know it
can you help me ؟
Gratefully
In the Calculate Field tool, the Arcade expression
Mid($feature.BQCODE, 3, 2)
is the equivalent of the Python expression
!BQCODE![3:5]
Python uses a start index and an end index. Arcade uses the start index and the number of characters.
Thank you 😍