title: How to groupby pandas dataframe and sum values in another column
body: <p>I have a pandas dataframe with 3 columns (CHAR, VALUE, and WEIGHT).</p>
  <ul>
  <li><p>CHAR column contains duplicate values which I need to group ['A', 'A', 'A', 'B', 'B', 'C'].</p>
  </li>
  <li><p>VALUE column has a unique value for every unique CHAR [10, 10, 10, 15, 15, 20].</p>
  </li>
  <li><p>WEIGHT column has various values [1, 2, 1, 4, 4, 6].</p>
  </li>
  </ul>
  <p>Consider an example of my initial dataframe:</p>
  <p><a href="https://i.stack.imgur.com/czIu7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/czIu7.png" alt="enter image description here" /></a></p>
  <p>I need to create a new dataframe which will have 3 columns.</p>
  <ul>
  <li>CHAR which will not have any duplicates</li>
  <li>T_VALUE (total value) which will have a sum of this CHAR's value and all its weights</li>
  <li>T_WEIGHT (total weight) which will have a sum of this CHAR's weights</li>
  </ul>
  <p>Result would look like this:</p>
  <p><a href="https://i.stack.imgur.com/kc4uA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kc4uA.png" alt="enter image description here" /></a></p>
  <p>I would highly appreciate any help.</p>