title: Cannot Calculate Sum of Currency-Based Column Data in Pandas
body: <p>I have the following CSV data:</p>
  
  <pre><code>+----------+-------------+-------+---------+
  | Category | Part Number | Units |  Cost   |
  +----------+-------------+-------+---------+
  | Axel     |          78 |   587 | $159.95 |
  | Rim      |          48 |   234 | $38.75  |
  | Nut      |          39 |  1234 | $0.15   |
  | Axel     |          79 |    67 | $110.95 |
  +----------+-------------+-------+---------+
  </code></pre>
  
  <p>And the following code:</p>
  
  <pre><code># Importing the libraries
  import numpy as np
  import matplotlib.pyplot as plt
  import pandas as pd
  
  # Importing the dataset
  df = pd.read_csv('stock.csv',engine="python")
  
  #Sum of values by category
  df.groupby('Category').sum()['Units']
  df.groupby('Category').sum()['Cost']
  </code></pre>
  
  <p>When I run the second to last line, I get the following output:</p>
  
  <pre><code>df.groupby('Category').sum()['Units']
  Out[4]: 
  Category
  Axel     654
  Nut     1234
  Rim      234
  Name: Units, dtype: int64
  </code></pre>
  
  <p>When I run the last line, I get the following error:</p>
  
  <pre><code>KeyError: 'Cost'
  </code></pre>
  
  <p>I'm not sure if there is a simple way to sum the data without converting the data type to an integer and then converting it back.</p>