I have an csv file which have 100s of columns and rows. There two columns are my interest and based on that I need to create new columns in that csv file. Example: I have interested columns as below, input.csv
count description
1 Good
2 Medium
2 Best
1 Worst
2 Worst
1 Medium
9 Good
Output I expected, output.csv
count description Good Medium Best Worst
1 Good 1 0 0 0
2 Medium 0 2 0 0
2 Best 0 0 2 0
1 Worst 0 0 0 1
2 Worst 0 0 0 1
1 Medium 0 1 0 0
9 Good 9 0 0 0
In the above csv table, based on the values of 'count' and 'description'. I am creating new columns Good,Medium,Best,Worst (from description values) and fill the values from count and put null to unavailable values of that row. I tried with compare the columns and map the value,but not able to put the value properly in the new columns.