title: python replace multiple values from all columns in dataframe pandas
body: <p>Below is a sample of my table.</p>
  <p><img src="https://i.stack.imgur.com/qpVOO.png" alt="DataFrame" /></p>
  <p>Below is the code for the table:</p>
  <pre><code>d = {'1978': ['10k', '20000'],
      '1979': ['30k', '2M'],
      '1980': ['60000', '20k'],
      '1981': ['10000', '1M'],
      '1982': ['15000', '70k'],
      '1983': ['12k', '8M']}
  df = pd.DataFrame(data=d)
  </code></pre>
  <p>Actually, the one I am working has 60 columns and 200 rows. However, It's the same structure.</p>
  <p>My goal is to replace &quot;k&quot; for &quot;000&quot; and &quot;M&quot; for &quot;000000&quot; for all the rows of the many columns.</p>
  <p>So the output should be:</p>
  <p><img src="https://i.stack.imgur.com/vTdAh.png" alt="Expected DataFrame" /></p>
  <p>If someone could share with me the code to get this desired output, I would really appreciate.</p>