title: Pandas - understanding output of pivot table
body: <p>Here is my example:</p>
  
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({
      'Student': ['A',  'B', 'B'],
      'Assessor': ['C',  'D', 'D'],
      'Score': [72, 19, 92]})
  df = df.pivot_table(
      index='Student',
      columns='Assessor',
      values='Score',
      aggfunc=lambda x: x)
  print(df)
  </code></pre>
  
  <p>The output looks like:</p>
  
  <pre><code>Assessor    C       D
  Student              
  A          72     NaN
  B         NaN  [1, 2]
  </code></pre>
  
  <p>I am not sure why I get '[1,2]' as output. I would expect something like:</p>
  
  <pre><code>Assessor    C       D
  Student              
  A          72     NaN
  B         NaN     19
  B         NaN     92
  </code></pre>
  
  <p>Here is related question:</p>
  
  <p>if I replace my dataframe with </p>
  
  <pre><code>df = pd.DataFrame({
      'Student': ['A',  'B', 'B'],
      'Assessor': ['C',  'D', 'D'],
      'Score': ['foo', 'bar', 'foo']})
  </code></pre>
  
  <p>The output of the same pivot is going to be </p>
  
  <pre><code>Process finished with exit code 255
  </code></pre>
  
  <p>Any thoughts.</p>