INC
increments the value of a number by 1, returning a float. For non-numeric types, INC
will throw an error.
Function category: Statistical​
INC(arg1)
Arguments | Description |
arg1 | Either an integer, float or fraction. |
Let's say we're given the following response with some driver performance ratings.
{"data": {"driver_performance_ratings": ["-0.6","-0.1","2","3/4"]}}
If we wanted to iterate over the list and increment each rating by 1, we could pass INC
to MAP
using the following function.
# Increment each rating by 1MAP(INC, data.driver_performance_ratings)​# Returns ["0.4","0.9","3,"1.75"]