title: Simple Python SumIf Equivalent
body: <p>I have a data frame that I want to group by and aggregate based on certain conditions and given a simplified example below.</p>
  <pre><code>|Key|Amount|Bitcoin
  |ABC|100|0
  |ABC|200|0
  |ABC|100|1
  </code></pre>
  <p>Desired Output:</p>
  <pre><code>|Key|Total Amount|Bitcoin Amount
  |ABC|400|100
  </code></pre>
  <p>Now I could easily groupby the key and sum the amount and seperately create a dataframe with just bitcoin transactions, group that and join the two dataframes but there must be an easy one line of code to handle this problem?</p>
  <p>Thanks in advance.</p>