title: how to replace pyspark dataframe columns value with a dict
body: <p>I have a dataframe as show below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  +++++++++++++++++++++
    colA | colB | colC |
    +++++++++++++++++++++
    123  | 3 | 0|
    222  | 0 | 1|
    200  | 0 | 2|</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to replace the values in colB with a dict d to get the result like this.</p>
  
  <p>d = {3:'a', 0:'b}</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  +++++++++++++++++++++
    colA | colB | colC |
    +++++++++++++++++++++
    123  | a | 0|
    222  | b | 1|
    200  | b | 2|</code></pre>
  </div>
  </div>
  </p>