I have a file in .csv with contains ht:
1,winter
2,autumn
3,winter
4,spring
5,summer
6,autumn
7,autumn
8,summer
9,spring
10,spring
I need to parse this file to generate one containing :
winter = 1,3
autumn = 2,6,7
spring = 4,9,10
summer = 5,8
I find this post How to print count of occourance of some string in the same CSV file using Python? but I could not adapt to what I want.
I appreciate any help or guidance to address this concern.
Thanks.