title: Filter all unique items in column1 as a Key, along with Column2 and Column3 as key:value as a Value in nested Dataframe from regular DataFrame
body: <p>I'm looking to take a regular DataFrame into a nested DataFrame, then finally convert the nested DataFrame back to a dictionary.</p>
  
  <p>After cleansing my data-set in Pandas, here is what the data-set looks like in the DataFrame:</p>
  
  <p>Input: <code>df.head(5)</code></p>
  
  <p>Output:</p>
  
  <pre><code>    reviewerName    title                               reviewerRatings
  0   Charles         Harry Potter Book Seven News:...    3.0
  1   Katherine       Harry Potter Boxed Set, Books...    5.0
  2   Lora            Harry Potter and the Sorcerer...    5.0
  3   Cait            Harry Potter and the Half-Blo...    5.0
  4   Diane           Harry Potter and the Order of...    5.0
  </code></pre>
  
  <p>Next, I checked to see the number of unique reviewerNames in my dataset:</p>
  
  <p>Input: <code>len(df['reviewerName'].uqinue())</code></p>
  
  <p>Output: <code>66130</code></p>
  
  <p>Now, I'm trying to find a way to take all the 66130 unique reviewerName and assign them all as the <strong>key</strong> in the new nested DataFrame, then assign the <strong>value</strong> using "title" and "reviewerRatings" as another layer of key:value in the nested DataFrame.</p>
  
  <p>When I tried to see how many of the 1st unique value was showing, I get this:</p>
  
  <p>Input: <code>df[df['reviewerName'] == 'Charles G']</code></p>
  
  <p>Output:</p>
  
  <pre><code>      reviewerName                               title   reviewerRatings
  0          Charles    Harry Potter Book Seven News:...               3.0
  19156      Charles    Harry Potter and the Half-Blo...               3.5
  19156      Charles    Harry Potter and the Order of...               4.0
  </code></pre>
  
  <p>I'm hoping to manipulate the DataFrame so it can look somewhat like this as an output: </p>
  
  <pre><code>           title                                reviewerRatings
  Charles    Harry Potter Book Seven News:...     3.0
             Harry Potter and the Half-Blo...     3.5
             Harry Potter and the Order of...     4.0
  Katherine  Harry Potter Boxed Set, Books...     5.0
             Harry Potter and the Half-Blo...     2.5
             Harry Potter and the Order of...     5.0
  </code></pre>
  
  <p>I tried to separate each of the three columns (reviewerName, title, reviewerRatings), then concatenate the items together but found no luck as per below:</p>
  
  <p>Input:</p>
  
  <pre><code>p1 = df[['reviewerName']]
  p2 = df[['title']]
  p3 = df[['reviewerRatings']]
  concatenated = pd.concat([p1,p2,p3], keys=list[p1.unqiue])
  concatenated
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-106-5a6be8c1a3ba&gt; in &lt;module&gt;()
  ----&gt; 1 concatenated = pd.concat([p1,p2,p3], keys=list[p1.unqiue])
        2 concatenated
  
  C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name)
     4370             if self._info_axis._can_hold_identifiers_and_holds_name(name):
     4371                 return self[name]
  -&gt; 4372             return object.__getattribute__(self, name)
     4373 
     4374     def __setattr__(self, name, value):
  
  AttributeError: 'DataFrame' object has no attribute 'unqiue'
  </code></pre>
  
  <p>I also looked into Pandas documentation with no luck, not sure if anyone here can look into this.</p>
  
  <p>Once the desired output is solved, I'm hoping to convert the nested DataFrame into a nested Dictionary.</p>
  
  <p>Thanks!</p>