python - How to combine multiple rows to extra columns in a pandas dataframe? -


i have dataframe:

    c1 c2  c3 0   1   11 1   1  b  12 2   2   21 3   2  b  22 

now want transform new dataframe like

    c1     b 0   1  11  12 1   2  21  22 

how can achieve pandas?

i found answer in question: python-pandas-convert-rows-as-column-headers. use pivot_table


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -