title: Pyspark: create spark data frame from nested dictionary
body: <p>How to create a spark data frame from a nested dictionary? I'm new to spark. I do not want to use the pandas data frame.</p>
  
  <p>My dictionary look like:-</p>
  
  <pre><code>{'prathameshsalap@gmail.com': {'Date': datetime.date(2019, 10, 21),'idle_time': datetime.datetime(2019, 10, 21, 1, 50)},
   'vaishusawant143@gmail.com': {'Date': datetime.date(2019, 10, 21),'idle_time': datetime.datetime(2019, 10, 21, 1, 35)},
   'you@example.com': {'Date': datetime.date(2019, 10, 21),'idle_time': datetime.datetime(2019, 10, 21, 1, 55)}
  }
  </code></pre>
  
  <p>I want to convert this dict to spark data frame using pyspark data frame.</p>
  
  <p>My expected output:-</p>
  
  <pre><code>                                Date    idle_time
      user_name       
  prathameshsalap@gmail.com   2019-10-21  2019-10-21 01:50:00
  vaishusawant143@gmail.com   2019-10-21  2019-10-21 01:35:00
  you@example.com             2019-10-21  2019-10-21 01:55:00
  </code></pre>