I was trying to filter my sensor data. My objective is to filter the sensor data where the data is more or less stationary over a period of time. can anyone help me in this

```
time : 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20  

sensor : 121
115
122
123
116
117
113
116
113
114
115
112
116
129
123
125
130
120
121
122

```

this is a sample data, i need to take the first data and compare it to the next 20 seconds of data, if all the 20 datas is in the the range of +or- 10 then i need to filter these 20 datas to another column, and i need to continue this process of filtering