I have a DataFrame filled with various price characteristics (open, closed, high, low, open-close, etc.). 

I am trying to calculate mean value of column "High-Open" but only for the rows where values in column "Open-Close" greater than some value (call it "cents\_diff").

The code works, but gives wrong value. Any ideas how it can be done in elegant way? Thanks!

```
mean([j for j in temp['high-open'] for i in temp['open-close'] if i > cents_diff])

```