Now if you have worked with observations, such as
weather observations, for example, temperatures,
you might have noticed that you have these kinds
of values sometimes in those data, which means
there was no value, no valid value detected for
that observation. And organizations use that
spatial value to mean no data. So if we wanted to
use a list comprehension, where we divide by 10,
all these values, we want to be careful not to
divide this value by 10, we want to ignore that.
For that we need an if conditional inside the list
comprehension, we can do it like that. So create a
new variable where you will store the new list.
And again, let's say temp divided by 10 for 10 in
temps if temp is different, for example, then
-9999, print(new_temps), execute on the
terminal, and we get the expected result. So this
is just like the simple loop that we saw in the
previous video with the addition of the if
conditional, so that is a conditional. We are
checking if temp is different than -9999.
[Outro sound]