title: generating a dictionary from two columns of pandas dataframe and putting them into a new dataframe
body: <p>This is my df:</p>
  <pre><code>import pandas as pd
  
  
  df = pd.DataFrame(
      {
          'uri': ['a', 'a', 'a', 'b','b', 'c', 'c', 'c'],
          'predicate': ['same', 'wiki' ,'wiki', 'same', 'same', 'same', 'same', 'wiki'],
          'object': ['x', 'y' ,'s', 'h', 'k', 'o', 'm', 'n'],
      }
  )
  </code></pre>
  <p>I want to generate a new dataframe like the one below:</p>
  <pre><code>uri    result
  a      {'same':['x'], 'wiki':['y', 's']}
  b      {'same':['h', 'k']}
  c      {'same':['o', 'm'], 'wiki':['n']}
  </code></pre>
  <p>I tried this code but I don't know how to generate a dataframe out of it.</p>
  <pre><code>df.groupby(['uri', 'predicate'])['object'].apply(list).to_dict()
  </code></pre>