Dear Dynamo Team,
one more question please. How can i remove last 0 values of string list. Please see photo:
Dear Dynamo Team,
On a side note: I assume you’re getting the trailing zeroes because you’ve converted a double value to a string. In that case you could also use this python code to get what you want straight away:
You have empty places in your list… that causes the error… (and gives “null”) as you cannot remove 4 characters from nothing…
But you should not use this method for rounding as it does not round but rather remove characters…
Not working, thnx
You’re probably using strings not numbers/doubles, strings cannot be rounded as they are “text”-based…
Next time instead of just writing “not working”… which is kinda rude, include a screenshot of what is not working so we have a chance of helping you correctly and not just guess what you’re actually doing…
Yes you’re right, it’s because of my Replacebycondition node to take off my null values.
PS: Have you an idea about how to get my first item different of the others ? (the 35/40 value)
can u tell me how can i get the round of my values on the list ?
516,469038 -> 520
1106,719368 -> 1110
An idea ?
That was proposed by @m.rijsmus earlier in this post You just need to make sure that you’re rounding “numbers” and not “strings”…
But that is not just rounding you’re looking for that is approximation to nearest 10
But even though there is an error your result is correct (and will work downstream just as well).
Alternatively you can replace the null’s prior to rounding…
thnk’s a lot
You can also use the “Math.Round+” from clockwork to round to nearest 10…
Please do not just write “found something” share what you’ve found and help future people having similar issues…
Indeed, but what i changed was on my excel sheet