Separating positive and negative values of pandas DataFrame
<p>I need to separately sum all positive and negative values in a column ie </p>

<pre><code>pos_values = [x for x in df.prediction_at_ohlcv_end_date if x &gt; 0] 
neg_values = [x for x in df.prediction_at_ohlcv_end_date if x &lt; 0] 
</code></pre>

<p>Here's a data sample</p>

<pre><code>market_trading_pair next_future_timestep_return ohlcv_start_date    prediction_at_ohlcv_end_date
0   Poloniex_ETH_BTC    0.003013    1450753200  -0.157053
1   Poloniex_ETH_BTC    -0.006521   1450756800  -0.920074
2   Poloniex_ETH_BTC    0.003171    1450760400  0.999806
3   Poloniex_ETH_BTC    -0.003083   1450764000  0.627140
4   Poloniex_ETH_BTC    -0.001382   1450767600  0.999857
</code></pre>

<p>What's a nice way to do this in pandas ?</p>

<p>EDIT:</p>

<p>I have been able to do this thanks to some helpful stackers, I realised I can't a futher calculation however. `</p>

<pre><code>if prediction_at_ohlcv_end_date &gt; 0 : 
return = prediction_at_ohlcv_end_date * next_future_timestep_return. 
</code></pre>

<p>For each element in the frame, Any ideas?` </p>