1
00:00:00,450 --> 00:00:07,230
Now if you have worked with observations such as weather observations, for example temperatures you might

2
00:00:07,230 --> 00:00:13,200
have noticed that you have these kinds of values sometimes in those data which means there was no value,

3
00:00:13,410 --> 00:00:16,760
no valid value detected for that observation.

4
00:00:16,860 --> 00:00:21,120
And organizations use that special value to mean no data.

5
00:00:21,660 --> 00:00:28,830
So if we wanted to use a list comprehension where we divide by 10 all these values, we want to be careful

6
00:00:28,830 --> 00:00:31,350
not to divide this value by 10.

7
00:00:31,380 --> 00:00:32,760
We want to ignore that.

8
00:00:32,880 --> 00:00:37,010
For that we need an if conditional inside the list comprehension.

9
00:00:37,020 --> 00:00:39,380
We can do it like that.

10
00:00:39,480 --> 00:00:42,880
So create a new variable where you will store the new list.

11
00:00:43,140 --> 00:00:55,950
And again let's say temp divided by 10 for temp in temps if temp is different for example then

12
00:00:55,950 --> 00:00:57,540
minus 9999.

13
00:00:58,260 --> 00:01:05,830
Print new temps executes on the terminal and we get the expected result.

14
00:01:05,850 --> 00:01:12,420
So this is just like the simple loop that we saw in the previous video with the addition of the if conditional.

15
00:01:12,420 --> 00:01:14,540
So that is the conditional.

16
00:01:14,860 --> 00:01:18,240
We are checking if temp is different than minus 9999.

