How to do a transpose a dataframe group by key on pandas?
<p>I have this table from my database and I need a transpose group by survey_id</p>

<pre><code>id  answer  survey_id   question_number questionid 
216     0.0         69               3         2.0   
217     3.0         69               4         3.0   
218     0.0         69               5         4.0   
219     0.0         69               6         5.0   
221     0.0         69               8         7.0 
</code></pre>

<p>Like this:</p>

<pre><code>Survey P01  P02 P03 P04 P05
69     1    1   2   2   1
</code></pre>

<p>The cell is the answer and the column is format "P{question_number}"</p>

<p>I'm using pandas 0.18.1.</p>

<p>How can I do that?</p>