title: Converting $1B into number
body: <p>I retrieve a csv file from nasdaq website with a few columns (Ticker, MarketCap...). I use read_csv from pandas to get a dataframe. My problem is that I can't convert the format of the MarketCap column into a number.
  This is how the MarketCap column looks like:</p>
  
  <pre><code>MarketCap
  $5.54B
  $526.85M
  $28.41M
  nan
  nan
  </code></pre>
  
  <p>Ideally I would want to drop the $ sign and convert B into 1'000'000'000 and M into 1'000'000
  The replace/to_replace functions in pandas don't seem to work here.
  I would like to update my dataframe as follow:</p>
  
  <pre><code>MarketCap
  5'540'000'000'000
  526'850'000'000
  28'410'000'000
  nan
  nan
  </code></pre>
  
  <p>(I used ' as thousand separator just for clarity). I don't care about the nan values, so this can't be dropped/ignored for now.</p>
  
  <p>I tried to use the replace method from pandas as follow:</p>
  
  <pre><code>df['MarketCap].replace(to_replace= ['B', 'M'], values= ['*1000000000', '*1000000'], inplace=True)
  </code></pre>
  
  <p>unfortunately since the column is of string format the above doesn't apply the multiplication.</p>