title: How to convert arrays to map?
body: <p>I have a spark dataframe like this:
  <a href="https://i.stack.imgur.com/DnmTN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DnmTN.png" alt="enter image description here"></a></p>
  
  <p>The schema is:
  <a href="https://i.stack.imgur.com/RRCyW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RRCyW.png" alt="enter image description here"></a>
  I want to have the final result like this:
  <a href="https://i.stack.imgur.com/8tNbn.png]" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8tNbn.png]" alt="enter image description here"></a>
  Namely, to create a map between <code>_1: integer</code> and <code>_2: map</code> in <code>site_group</code>. </p>
  
  <p>How to do this in scala spark?</p>