title: How to change values of a column in a Pyspark dataframe from a map of two columns of the same df
body: <p>So I have a dataframe say df, with multiple columns. I now create a dataframe from df, say map, passing only columns A and B and keeping only the unique rows. Now I want to modify df in such a way such that, if for a row in df, I find df['B'] in the map, then df['A'] should be key value from the map otherwise df['A' remains the same. </p>
  
  <p>Any useful suggestions would be appreciated.</p>