I have data 

```
diff_time
0
124
56
87
40
168
449
13

```

I should write a function, where I can get 2 parameters automatically `a and b`, where 

```
for el in df['diff_time']:
    if el > a:
        el = b
    else:
        el = continue

```

How can I solve this task? Is it real to do using [scipy.optimize](http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.optimize.curve_fit.html)?