Count specific data in a data frame & display
<p>am having exam dataframe  with student.id  marks</p>

<pre><code>student.id  marks
     2         2
     2         2
     2        -1
     3        -1
     3        -1  
     3         2
     4         2
     4        -1
     5         2
     5         2
     5         2
</code></pre>

<p>how could i sum total marks for a specific student.id like below table</p>

<pre><code>  student.id     total-marks
       2           
       3
       4
       5
</code></pre>

<p>how can i obtain the above table with respective total marks ? thanks</p>