title: Using more than one column for indexing in a pivot table
body: <p>I would like to combine two columns for index while pivoting a <code>pandas</code> <code>dataframe</code>. I'm using the following code to do so:</p>
  
  <pre><code>ConceptTemp = Concept.pivot(index=['memberid','testscoreid'], columns='questionid', values='correct')
  </code></pre>
  
  <p>this gives me the following error:</p>
  
  <blockquote>
    <p>ValueError: Wrong number of items passed 1532, placement implies 2</p>
  </blockquote>
  
  <p>1532 is the number of rows in my <code>dataframe</code>. I can't <code>pivot</code> only on <code>memberid</code> or on <code>testscoreid</code> as I'll have duplicate <code>questionid</code> values. The index column has to be a combination of <code>testscoreid</code> AND <code>memberid</code>.</p>
  
  <p>Would anyone have any pointers on how to get this done?</p>