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
Post a Comment