0

My input dataframe is;

Date         ID    Sub    Amount Result
2018-01-01   42    100    45     default
2018-01-04   42    100    14     notdefault
2018-01-24   42    100    10     default
2018-01-03   43    101    12     notdefault
2018-02-03   43    101    21     default

Dataframs is ordered by ID and Date. And i want to convert the dataframe like this;

ID   Sub   Default1 Default2 ...
42   100   45       10
43   101   21       -

Could you please help me about this?

Salih
  • 719
  • 1
  • 6
  • 12
  • Does this answer your question? [Pandas transpose rows to columns](https://stackoverflow.com/questions/43639978/pandas-transpose-rows-to-columns) – Tyler Oct 21 '20 at 14:55
  • Refer to Question 10: pivot with two columns in the dup link. – Quang Hoang Oct 21 '20 at 15:27

0 Answers0