docs/src/reference-dsl-filter-statements.md
You can use the filter DSL keyword within the put verb. In fact, the following two are synonymous:
The former is a little easier to type. For another example:
<pre class="pre-highlight-in-pair"> <b>mlr --csv put '@running_sum += $quantity; filter @running_sum > 500' example.csv</b> </pre> <pre class="pre-non-highlight-in-pair"> color,shape,flag,k,index,quantity,rate yellow,circle,true,8,73,63.9785,4.2370 yellow,circle,true,9,87,63.5058,8.3350 purple,square,false,10,91,72.3735,8.2430 </pre> <pre class="pre-highlight-in-pair"> <b>mlr --csv filter '@running_sum += $quantity; @running_sum > 500' example.csv</b> </pre> <pre class="pre-non-highlight-in-pair"> color,shape,flag,k,index,quantity,rate yellow,circle,true,8,73,63.9785,4.2370 yellow,circle,true,9,87,63.5058,8.3350 purple,square,false,10,91,72.3735,8.2430 </pre>